Must-share information (formatted with Markdown):
- which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
- what are you trying to achieve
- what have you tried so far to achieve this
SonarQube version - 6.7.7
GitHub Enterprise On-premise edition
I’m trying to execute the sonarqube analyse inside docker container from github action. I have the below code in my build workflow file as part of Sonarqube.
- name: SonarQube Scan
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
LC_ALL: "UTF-8"
run: |
/home/sonar/sonar-scanner/bin/sonar-scanner
-Dsonar.projectName=Sonar-Project
-Dsonar.projectKey=sonar.github
-Dsonar.projectVersion=1.1
-Dsonar.sourceEncoding=UTF-8
-Dsonar.login=admin
-Dsonar.password=${{ secrets.SONAR_TOKEN }}
-Dsonar.projectBaseDir=.
-Dsonar.sources=src/main
But it fails with below errors,
INFO: Total time: 0.658s
ERROR: Error during SonarQube Scanner execution
ERROR: Not authorized. Analyzing this project requires to be authenticated. Please provide the values of the properties sonar.login and sonar.password.
INFO: Final Memory: 18M/1963M
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
INFO: ------------------------------------------------------------------------
Error: Process completed with exit code 2.
Although i have provided login and password as part of execution, What is wrong with above workflow?