We are deprecating sonar.login and sonar.password as a way of authenticating with SonarCloud during the analysis. Please switch to sonar.token going forward. You will receive a warning on any project that is still using the deprecated parameters.
Thanks for reporting it.
We will fix this warning in some time.
You do not need to worry about potential issues as the extension will be modified accordingly.
I use sonar.token property in our Jenkins script call but still get the warning:
withSonarQubeEnv('My SonarCloud Instance') {
sh "sonar-scanner -Dsonar.token=$SONAR_AUTH_TOKEN"
}
WARN: The property 'sonar.login' is deprecated and will be removed in the future. Please use the 'sonar.token' property instead when passing a token.
INFO: Preprocessing files...
INFO: 3 languages detected in 96 preprocessed files
INFO: 0 files ignored because of inclusion/exclusion patterns
INFO: 56 files ignored because of scm ignore settings
I checked all versions but didn’t find anything
Jenkins SonarQube plugin is at version 2.16.1 (latest)
sonar-scanner-cli binary is at version 5.0.1.3006 (latest)
When running sonar scanner Maven plugin (the latest available version atm), I get the same confusing error:
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:4.0.0.4121:sonar (default-cli) on project ***: Not authorized. Analyzing this project requires authentication. Please provide a user token in sonar.login or other credentials in sonar.login and sonar.password. → [Help 1]
Note: This happens when I supply “sonar.token” only; if I replace it with “sonar.login” (keeping the same auth token), error is gone and code scan commences…