Hi,
I’m trying to integrate SonarQube with Azure Devops. I have done the configuration in the SonarQube administrator ( Administration > Configuration > General Settings > ALM Integrations , select the Azure DevOps tab, and click the Create configuration button) and setup the service connection in Azure Devops.
Also configured the SonarScanner properties file.
sonar.projectkey= Project
sonar.projectName= Project name is given
sonar.login = token from SonarQube
Verified the Sonar-scanner using cmd command “sonar-scanner -h”. The sonar-scanner.bat file also has successfully executed.
In Azure devops Build pipeline, have configured the branch - Prepare Analysis Configuration, Run Code Analysis and Publish Quality Gate Result. When we run the pipe it fails with the below error.
ERROR: Not authorized. Please check the properties sonar.login and sonar.password.
ERROR: Error during SonarScanner execution
ERROR: Not authorized. Please check the properties sonar.login and sonar.password.
INFO: ------------------------------------------------------------------------
##[error]ERROR:
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
ERROR:
Below are the last lines of the log
“GET /batch/file?name=sonar-scanner-engine-shaded-9.0.1.46107-all.jar HTTP/1.1” 200 - “-” “ScannerCLI/4.6.1.2450” “AXtcvnCkoRmL3dzQAADB”
“GET /api/settings/values.protobuf HTTP/1.1” 401 - “-” “ScannerCLI/4.6.1.2450” “AXtcvnCkoRmL3dzQAADC”
Kindly help me with the above error. Thanks in Advance.