I’m hitting this error when running sonarcloud/scan.
ERROR: Error during SonarQube Scanner execution
ERROR: You’re not authorized to run analysis. Please contact the project administrator.
I saw that another user reported a similar problem possible when changing report paths. ERROR: You're not authorized to run analysis. Please contact the project administrator - #6 by Sudhir
This error started appearing after updating
I confirmed the path is correct and the lcov.info file is there.
Any help appreciated.
Thank you in advance
typo: “(…)a similar problem possible when(…)” => a similar problem possibly when
I suspect the update to your analysis properties is a red herring. You could confirm/disprove that by reverting the change. Unless… at the same time you updated the properties file to change the coverage value, you also accidentally changed the auth token in the file. The more I think about it the more it seems that commit history is the key here.
So actually the path doesn’t seem to be the problem, the CircleCI job it runs in is. If I keep the path but run it in a different job, it fails with the error above. And it seems that even if I copy the entire definition of the working job and paste it into a new job, sonar also doesn’t work. Same auth error. No changes in sonar-project.properties. There’s no auth token in this file though (there never was).
This kinda implies that there a circumstances under which you can run analysis with that particular
sonar-project.properties file and have analysis succeed?
Because… the error is pretty clear. You need to provide credentials to an account with analysis privs on that project to run analysis.
You are absolutely right, I was focusing on what changed, but forgot about what should have changed but didn’t. Needed to add the SonarCloud context to the job. It’s working now.
Thank you for you time!