Regarding SonarQube execution failed

Hello Team,

*We are using sonarqube community edition of 10.6 version with sonar-scanner-cli-6.2.1.4610

  • We deployed sonarqube by zip
  • We are not able to execute sonarqube
  • We have updated the user key also verified environment variable of sonar scanner and java home. We have executed from command line and IDE as well

ERROR You’re not authorized to analyze this project or the project doesn’t exist on SonarQube and you’re not authorized to create it. Please contact an administrator.
INFO EXECUTION FAILURE

Thanks,
Huzaifa Siddiqui

Does the project already exist on SonarQube? If not, does the user for whom the token was generated have Create Projects permission?

Hi Colin,

Yes, Project is already existed on SonarQube and user have Browse, see code and execute analysis permissions and admin user has create permission.

Thanks,
Huzaifa Siddiqui

  • How are you supplying the authentication (the token) to the scanner? Via an analysis parameter (sonar.token), via the SONAR_TOKEN environment variable? Something else?
  • What type of token is it? You can tell from the prefix:
    • squ_ is a user token, that among other things is an analysis token valid for any project the user has Execute Analysis permissions on
    • sqa_ is an analysis token valid for any project the user has Execute Analysis permissions on
    • sqp_ is an project-specific analysis token, only valid for the project it was provisioned for

Hi Colin,

Find below answers to your questions:

    • How are you supplying the authentication (the token) to the scanner? Via an analysis parameter (sonar.token), via the SONAR_TOKEN environment variable? Something else?
      → User itself generates login token and copy the token and paste it in sonar.property file (sonar.login = ***)
  1. What type of token is it? You can tell from the prefix:
    → We are using squ user token. User can see code, browse and execute analysis.

Let me know if I am missing anything.

Thanks,
Huzaifa

I still think it’s likely that the project key you’ve specified (sonar.projectKey) doesn’t exist on your SonarQube Server – and your user does not have Create Projects permission. You can temporarily test this by granting that user Create Projects permission and running analysis again.