hello,
I have the same problem and task: SonarQubePublish@4 fails with unauthorized status code 401,
How can I grant permission to the request? can you be more specific? thank you
SonarQube version:9.5
SonarQube-PostgreSQL:12
Publish Quality Gate Result Plugin:4
Hello,
So I tried to move maven task as you said and I got failed build
Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar (default-cli) on project testing-helloworld: 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]
This is normal because I’m attempting to use sonarqube analysis prior to even linking the sonar scanner with sonar server.
my problem is I don’t know how to grant permission to my local hosted agent ( btw I’m using Azure Devops) to be able to publish quality result to quality gate.
Hello Ann,
Thank you for your reply. Regarding the token, I simply removed a couple of characters, so there is no harm done.
for the analysis logs, which one are we talking about because I found several inside /sonarqube/logs
I don’t know how the SonarQubePublish task is implemented, but you are probably missing the token in the http requests to the web services. For example, if using curl: curl -u '{TOKEN}:' ...