Insufficient privileges error with sonarRunner

别说谁变了你拦得住时间么 提交于 2019-12-10 14:15:32

问题


I am getting Insufficient privileges error running sonar. This started happening after I upgraded sonarQube to 5.0.

ERROR: Error during Sonar runner execution ERROR: Unable to execute Sonar ERROR: Caused by: Fail to decorate 'org.sonar.api.resources.File@152f931e[key=........]' ERROR: Caused by: {"errors":[{"msg":"Insufficient privileges"}]}

For the existing projects, I renamed the key and now I have new sonar projects. Those seems to be working fine for now. The new projects that are created are throwing this error. Any suggestions?


回答1:


The issue appears to be a bug in the Sonar Server 5.0 release.

https://jira.codehaus.org/browse/SONAR-6091

In order to work around it the 'SEE SOURCE CODE' project permissions can be set to include 'Anyone' from the admin page as in the below screen shot:

Obviously, this is not ideal in an unprotected environment because the source code can be viewed by anyone with access to the Sonar server API, but hopefully its addressed in the 5.1 release of Sonar Server.




回答2:


The problem for me (Sonar 6.1) was caused by the creation of the project in SonarQube: at the first execussion of the scanner, it creates the corresponding project in SonarQube, what I didn't allow for all users...

Restore the right for creating projects allow the scanner to successfully work.



来源:https://stackoverflow.com/questions/28391746/insufficient-privileges-error-with-sonarrunner

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!