Can't analyse branches on SonarCloud

Hi,

In our SonarCloud account we can’t analyse branches other than master. The little + icon is greyed out and it only displays links and info to the documentation. Even though I belong to the owners group in our organisation settings of SonarCloud, when I run the analysis using the parameter sonar.branch.name it says ERROR: You're not authorized to run analysis. Please contact the project administrator.. How can I solve this? This is something critical for us, as we’ve got some project handed over from a third party with poor quality code that we need to inspect.

Thanks.

Any help with this? I need to produce a report for the Board of Directors for end of business day today :frowning:

Hi,

Have you check that, in the project you want to analyze, in the ‘Administration’ -> ‘Permissions’ menu, you have corect rights with the user that you have generated the token with ?

image

Thanks,

Mickaël

Thanks,

Which CI tool are you using to build and analyze your code ?

We use GitHub for VCS and Scrutinizer CI, but it doesn’t build any deployments, it just runs tests.

Hi, any help with this? I need to produce the report today and I truly need to analyse branches to prove the increase on code quality. Thanks

What are the parameters that you are passing from the configuration of one scanner in your CI tools ?

sonar-scanner \ -Dsonar.projectKey=Project_project \ -Dsonar.organization=organisationame \ -Dsonar.sources=. \ -Dsonar.host.url=https://sonarcloud.io \ -Dsonar.branch.name=phase1-fixes -Dsonar.login=token

The SonarCloud analysis is run manually from the CLI, not from any CI tools. SonarCloud or Scrutinizer CI are totally agnostic from each other.

All we want is to go to the dashboard and be able to follow the standard documentation to analyse branches. We don’t need any integrations with other tools.

Have you tried with a newly generated token ?

Yes, I’ve even deleted the whole project and set it up again, and the same.

And is the sonar.sources path correct ? was it the same configuration as you default branch (which is working ?)

Yes, all the same.

On our dashboard the + icon for the branches is disabled for all users.

When you go to the background task, do you see newest one corresponding to the analysis you ran ? Is yes, is there any warning on it ?

no background task in there at all

Ok, then could you please run the scanner with -Dsonar.verbose=true and then send logs here ? With redacted things if needed. Thanks !

OK, running it now.

Weird… adding the debug parameter has solved the problems with the permissions. It’s analysing branches now