Reputation: 1287
I am unable to do code analysis from jenkins,I am getting 403 error.The Execute Analysis permission is provided for all the sonar users,sonar administrator and project creators,but still iam getting 403.
In jenkins job i have used goal sonar:sonar
Am i missing anything in the configuration?
Error :
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar (default-cli) on project core: Unable to load component class org.sonar.api.config.Settings: Unable to load component class org.sonar.scanner.repository.ProjectRepositories: You're only authorized to execute a local (preview) SonarQube analysis without pushing the results to the SonarQube server. Please contact your SonarQube administrator. -> [Help 1]
Upvotes: 0
Views: 1200
Reputation: 22804
Unless you've granted permissions to Anyone to perform analysis, then you will continue to have this failure because you're not providing credentials. Instead:
mvn sonar:sonar -Dsonar.login=analysis_token_here
Where the value of the login parameter is a User Token
Upvotes: 1