We renamed our GitHub organization, then updated the project key and repository binding for each of our projects. Afterwards, at least one of our SonarQube projects is throwing the error “Could not find a default branch for project with key ‘<organization_name>_<repository_name>’. Make sure project exists.”
I am able to view the project via GitHub and the default branch does exist. Other users seem to experience similar problems that appear to be fixed by updating the organization binding, but SonarQube users are not able to do this on their own.
ALM used GitHub
CI system used GitHub Actions
Languages of the repository: Java
Error observed Could not find a default branch for project with key '<organization_name>_<repository_name>'. Make sure project exists.
Reconnecting SonarQube to our GitHub organization seems to have fixed the missing branch problem.
The Organization Binding is still linking to the old name. Plus, clicking the SonarQube logo in the upper left of the website shows me the error “The page you were looking for does not exist.” It also links to the old organization name.
I removed SonarQube from our GitHub Organization and added it back. Fixing the Organization Binding under Administration > Organization Settings.
Navigating to the homepage in any way still shows me the “The page you were looking for does not exist.” error. These links still reference the old organization name. Even though navigating through my Profile > My Organizations works as expected.
Thank you for this report. We will track this bug internally.
In the meantime, can you confirm to me that your binding is now working as expected and the only outstanding bug is that when you try to go to the GitHub organization by clicking on the organization link from SonarQube Cloud, it redirects you to the old - unexisting - one?