1

The analysis parameters page in the documentation states that if Anyone (the pre-existing group of users) does not have permission to perform analyses, you'll need to supply the credentials of a user with Execute Analysis permission for the analysis to run under.

I've allowed the group "Anyone" (and no other group or user) in my SonarQube instance (Version 5.4) to perform analysis in the global permissions page but I'm still getting an error message when analyzing my project with the SonarQube scanner for Maven. I have this issue since the upgrade to 5.4 from 5.3. It fails at

[INFO] Load user information
[DEBUG] GET 401 http://sonar.all.alcatel-lucent.com/batch/users?logins=someUser | time=78ms

with the error:

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.0.1:sonar (default-cli) on project xxxx-parent: Not authorized. Analyzing this project requires to be authenticated. Please provide the values of the properties sonar.login and sonar.password.

I'm running the analysis in issues mode for the needs of a Jenkins plugin. I don't get the same issue in normal mode or on other projects. While looking at the project's permission, Anyone can browse, see source code and execute analysis. I've also tried settings up a user with every right on that project and providing the credentials in parameter. I get a similar behavior but with this message:

Not authorized. Please check the properties sonar.login and sonar.password

I've also tried with a user in a group that has every right on that project. I don't really understand how to configure that execute analysis permission. I believe these 2 issues (from the 5.4 upgrade note) are involved in some way but that's just a guess.

https://jira.sonarsource.com/browse/SONAR-7174 https://jira.sonarsource.com/browse/SONAR-7242

Thank you in advance for your answers.

Alexis.

4

1 回答 1

1

无法以匿名方式访问 WS 批处理/用户。因此,您的第一个问题是预期的(即尝试在没有凭据的情况下访问它时出现错误 401)。

现在关于您使用凭据的第二次尝试,请提供失败的 WS。您使用的帐户应具有全局“分析权限”或您要在预览模式下分析的项目。

于 2016-05-17T14:09:09.680 回答