GitHub action fails for login and password

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
        SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
        SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
        LC_ALL: "UTF-8"
      run: |
        -Dsonar.password=${{ secrets.SONAR_TOKEN }}

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: 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?


Your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

6.7.7 → 7.9.6 → 8.9.9 → 9.5 (last step optional)

You may find the Upgrade Guide and the LTS-to-LTS Upgrade Notes helpful. If you have questions about upgrading, feel free to open a new thread for that here.

If your error persists after upgrade, please come back to us.