Hi,
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 sonar.javascript.lcov.reportPaths
in sonar-project.properties
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
Hi,
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.
HTH,
Ann
Hi,
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).
Hi,
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.
Ann
Hi,
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!
Miguel