Must-share information (formatted with Markdown):
which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
plug in from AzureDevops Market Place
what are you trying to achieve
i am trying to scan the code through AzureDevops(VSTS) build pipeline
what have you tried so far to achieve this
i using 3 steps
Prepare analysis on SonarQube, i am using this task with sonarqube service end point which has token
Maven Steps under maven are below
Run SonarQube or SonarCloud analysis
Sonarqube version for Maven is latest
Publish Quality Gate Result
I am getting below error. i did check the forum and no luck.
Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:18.104.22.1686:sonar (default-cli) on project Not authorized. Please check the properties sonar.login and sonar.password
You say the SonarQube Server Endpoint is configured with a token. Can you double-check that the token used corresponds to a user who has “Execute Analysis” global permission in your SonarQube instance? Or, if the project already exists, check that the token corresponds to a user who has “Execute Analysis” permission on that specific project.
Hope this helps,
Jeff, The token used by the user is having the execute analysis permissions.
i am still seeing the same issue.
Is your pipeline a classic pipeline or YAML/configuration as code pipeline? Can you paste the specifics of your Prepare Analysis and maven execution tasks?
Thanks Jeff, I was able to fix the issue.
In case it’s helpful to others who find this thread via search in the future, would you mind replying with what the root cause & resolution were @kdevar?
Im facing the same issue. The error is exactly the same and the scenario is same as well. I use a YAML editor. Can you please help…