Skip to content

Instantly share code, notes, and snippets.

@topera
Created June 10, 2018 16:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save topera/1cd92871a7f09eab783feca46ad2a0b7 to your computer and use it in GitHub Desktop.
Save topera/1cd92871a7f09eab783feca46ad2a0b7 to your computer and use it in GitHub Desktop.
Sonarqube fix for gradle
  • PROBLEM

We run ./gradlew sonarqube

And get the error:

Execution failed for task ':sonarqube'.

You're only authorized to execute a local (preview) SonarQube analysis without pushing the results to the SonarQube server. Please contact your SonarQube administrator.

Tested with Gradle 4.8 and plugin org.sonarqube 2.6.2.

Note: maybe it's related to https://jira.sonarsource.com/browse/SONARMSBRU-322

  • SOLUTION

I removed the environment variable SONAR_TOKEN and put the token in command line and now it's working:

$ ./gradlew sonarqube -Dsonar.login=1111111122222233333344444555555566666677

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment