Failed executing goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746, not authorized

Sonarqube version - Version 8.5.1 (build 38104)
Scanner plugin version - 2.10

Issue: I’m trying to run “mvn sonar:sonar -Dsonar.pitest.mode=reuseReport -Dsonar.host.url= -Dsonar.java.source=1.8” from the Jenkins, but I’m getting an error that suggest to provide sonar.login and sonar.password.
However, the sonarqube has been set with anonymous access. And no token has been passed in the Jenkins side.

However with the same configuration, the Sonarqube version 8.4 works pretty well.

Am I missing something on 8.5? or is there a known issue with this version.

Thank you

Hi,

Are you saying that Anyone has Execute Analysis on the project?

 
Ann

Sonarqube version - Version 8.5.1 (build 38104)
Scanner plugin version - 2.10

Issue: I’m trying to run “mvn sonar:sonar -Dsonar.pitest.mode=reuseReport -Dsonar.host.url= -Dsonar.java.source=1.8” from the Jenkins, but I’m getting an error that suggest to provide sonar.login and sonar.password.
However, the sonarqube has been set with anonymous access. And no token has been passed in the Jenkins side.

Any suggestion is appreciable.

Also, if I want to try with the token what is the property that I need to pass, I tried with sonar.login="" as well as sonar.token="" but no go.

Thank you.

Yeh, and I should be able to run the scan without providing the credentials. This is exactly we have setup with our another setup which has lower version.

Let me know if you looking for any additional information from our end.

Thank you.

Hi,

There are no known issues and nothing changed in 8.5 related to this. Are you sure project permissions weren’t edited in the meantime? Would you mind including a screenshot of the project’s permissions?

 
Ann

When we run the scanner on a local machine, everything works well without passing the credentials. But the same command does not work from within the Jenkins. Between we are explicitly using 1.8 and I hope this is not causing any problem.

Hi,

Can you share the exact error you’re getting, please?

 
Ann

sure,

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar (default-cli) on project <project name>: Unable to load component class org.sonar.scanner.bootstrap.ScannerPluginInstaller: Unable to load component class org.sonar.scanner.bootstrap.PluginFiles: Unable to load component class org.sonar.scanner.bootstrap.GlobalConfiguration: Unable to load component class org.sonar.scanner.bootstrap.GlobalServerSettings: Not authorized. Please check the properties sonar.login and sonar.password. -> [Help 1]

@ganncamp - Please let me know if you need any additional information in this regard, we have been trying hard to get this fixed. Thank you.

Hi,

I’ve referred this internally.

 
Ann

Hi, wanted to check if there is any update on this. Thank you.

@ganncamp - This has become a priority for us so wanted to check if you have any updates around the same. Thank you.

@ganncamp Sorry, forgot to update, this issue has been fixed, we are password -Dsonar.password with blank value, that is how it has been fixed.

2 Likes