- 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