Sonarqube authentication Issue

96 Views Asked by At

I have an issue connecting to sonarqube using token. I have hard coded the url and token and its correct ones.

sonar-scanner -Dsonar.host.url=https://sonar.example.com -Dsonar.token=sqb_c9f1cdc863d3ab7633b -Dsonar.projectKey=example-web-component -Dsonar.projectName=example-web-component
INFO: Scanner configuration file: /opt/sonar-scanner-4.6.2.2472-linux/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarScanner 4.6.2.2472
INFO: Java 11.0.11 AdoptOpenJDK (64-bit)
INFO: Linux 5.10.184-175.749.amzn2.x86_64 amd64

INFO: User cache: /root/.sonar/cache
INFO: Scanner configuration file: /opt/sonar-scanner-4.6.2.2472-linux/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: Analyzing on SonarQube server 10.2.1.78527
INFO: Default locale: "en", source code encoding: "UTF-8" (analysis is platform dependent)
INFO: Load global settings
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 7.206s
INFO: Final Memory: 5M/28M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
ERROR: Not authorized. Please check the user token in the property 'sonar.token' or the credentials in the properties 'sonar.login' and 'sonar.password'.
ERROR: 
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.

Why authentication is failing even if passing correct creds.

ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.

0

There are 0 best solutions below