79668798

Date: 2025-06-17 09:34:23
Score: 1
Natty:
Report link

"check and set the projectKey according to what is listed in the sample file. For me it was a combination of organization and actual project key, not the name of the project in SonarQube!"

This did the trick for me. I was getting the error

Could not find a default branch for project with key...

when using project key only for -Dsonar.projectKey.
After Changing this to -Dsonar.projectKey=${SONAR_ORGANIZATION}_${CI_PROJECT_NAME} error went away. Thank you!

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Jussi Heinonen