SonarQube Authorization Problem

To use sonarqube implementation, I prefer sonarcloud.io. But i’m getting ERROR: Not authorized. Please check the properties sonar.login and sonar.password.My sonarQube parameters like that.

sonar.sources=.
sonar.organization=cenk_tuzun-bitbucket
sonar.login=*******
sonar.projectKey=$BITRISE_APP_TITLE
sonar.host.url=https://sonarcloud.io/
sonar.report.export.path=sonar-report.json
sonar.java.binaries=target/classes
sonar.sources=app/src/main/java
sonar.tests=app/src/test/java
sonar.java.coveragePlugin=jacoco

sonar.login comes from security tab in sonarcloud (via generate token)
sonar.organization comes from organizations tab in sonarcloud (defined as a key)

I tried with sonar.password with empty value but still ı’m getting this error.

I guess sonar.poassword field mandatory even it’s empty. When I added this line it works.

2 Likes

According to scanner documentation: https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner#AnalyzingwithSonarQubeScanner-Use only login property is mandatory (so password can be omitted).

However, in properties documentation: https://docs.sonarqube.org/display/SONAR/Analysis+Parameters#AnalysisParameters-OptionalParameters password should be blank if token is used.

In practice self-hosted Sonarqube server does not require password field if token is used.

I’ve asked about that on sonar Google group: https://groups.google.com/forum/#!topic/sonarqube/BJtectGsXzY

1 Like

@cenkTuzun there is an update on sonar Google group: https://groups.google.com/d/msg/sonarqube/BJtectGsXzY/8SP_NIv8AgAJ

1 Like