【问题标题】:Error uploading analysis to SonarQube将分析上传到 SonarQube 时出错
【发布时间】:2017-11-07 17:48:49
【问题描述】:

我有一个 Sonarcloud 帐户,我正在尝试使用 SonarQube.Scanner.MSBuild.exe 分析 Visual Studio 解决方案。我创建了一个令牌,并将其作为 SonarQube.Analysis.xml 文件中的 sonar.login 属性传递。 我使用https://sonarcloud.io 作为sonar.host.url,但我也尝试过https://sonarqube.com

这里是配置的相关sn-p:

<Property Name="sonar.host.url">https://sonarcloud.io</Property>
<Property Name="sonar.login">***my*token****</Property>
<Property Name="sonar.password"></Property>
<Property Name="sonar.organization">MyOrganization</Property>

分析似乎运行良好,但最终当它尝试将分析上传到 Sonarcloud 时,我收到此错误:

ERROR: Error during SonarQube Scanner execution
ERROR: You're only authorized to execute a local (preview) SonarQube analysis without pushing the results to the SonarQube server. Please contact your SonarQube administrator.

我已尝试连接到本地 Sonarqube 服务器,效果很好。有人知道这里出了什么问题吗?

【问题讨论】:

    标签: sonarqube sonarqube-scan


    【解决方案1】:

    您可能缺少sonar.organization 分析属性。您应该能够从项目主页上的组织键字段中获取值。如果您的项目在服务器上尚不存在,您可以通过登录获取它:我的帐户 > 组织

    【讨论】:

    • 感谢您的提示。不幸的是,它没有用。我用 SonarQubeAnalysis.xml 文件中的 sn-p 更新了问题。
    • 它毕竟工作了,但只有在我用 MSBuild.SonarQube.Runner.exe 替换了 SonarQube.Scanner.MSBuild.exe 之后。我不明白为什么它不能与扫描仪一起使用。
    猜你喜欢
    • 1970-01-01
    • 2018-02-26
    • 2020-01-23
    • 2019-11-08
    • 2018-11-12
    • 1970-01-01
    • 1970-01-01
    • 2023-03-31
    • 2013-10-25
    相关资源
    最近更新 更多