Inconsistent password property requirements

3,272 views
Skip to first unread message

karol.w...@droidsonroids.pl

unread,
Feb 24, 2018, 1:28:11 PM2/24/18
to SonarQube
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.

Which version is (or should be) correct?

Scott B.

unread,
Feb 25, 2018, 1:33:42 PM2/25/18
to SonarQube
Both are correct. ;-)

Depending on the SonarQube server, you can use sonar.login=username and sonar.password=password together OR sonar.login=token (without password).

karol.w...@droidsonroids.pl

unread,
Feb 25, 2018, 5:56:42 PM2/25/18
to SonarQube
OK, so if token is passed as sonar.login then sonar.password property may be unset, there is no need to set it to blank value?


nicolas...@sonarsource.com

unread,
Feb 26, 2018, 9:22:23 AM2/26/18
to SonarQube
Hi there,

Yup, sonar.login is enough when using tokens, no need to set sonar.password .

The issue you're referring to is probably unrelated to any of that then (assuming you did not do any typo when copy/pasting the token). For example something permissions -related, or else. Could you share the logs from the analysis, and clarify the actual value that is passed to sonar.projectKey ?

Best regards,
Nicolas

karol.w...@droidsonroids.pl

unread,
Feb 26, 2018, 12:52:37 PM2/26/18
to SonarQube
I'm not the author of original issue on discuss.bitrise.io, but I can forward this question there.
Reply all
Reply to author
Forward
0 new messages