Project not found for sonarcloud with github actions

Caused by: org.sonar.api.utils.MessageException: Project not found. Please check the ‘sonar.projectKey’ and ‘sonar.organization’ properties, the ‘SONAR_TOKEN’ environment variable, or contact the project administrator

1434Error:

1435Error: Re-run Maven using the -X switch to enable full debug logging.

1436Error:

1437Error: For more information about the errors and possible solutions, please read the following articles:

1438Error: [Help 1] MojoExecutionException - Apache Maven - Apache Software Foundation

1439Error: Process completed with exit code 1.

i use github to analysis the project, i suppose it’s the permission issue, but by default I think it should have the privilege. if it is the perssmion issue, where and how to fix it?

when a forked repo makes a pull request to origin master/main repo, the workflow should be triggered via pull_request_target instead of pull_request

Hi,

There are three possibilities listed in the error message:

  • sonar.projectKey
  • sonar.organization
  • the SONAR_TOKEN environment variable

Have you verified that all three are present and correct?

 
Ann

in pull_request, it cannot get the sonar_token; while in pull_request_target, it can. I suppose it’s a privilege issue of github.

1 Like