连接到 SonarQube 服务器时无法授权。检查您的凭据并重试

Could not authorize while connecting to the SonarQube server. Check your credentials and try again

我正在为我的 Xamarin Forms 项目尝试 运行 SonarQube,我在我的 .SLN 文件所在的路径上并执行以下命令

命令:

$ mono /Users/akandasamy/Development/HIDProjects/sonar-scanner-msbuild-4.0.2.892/MSBuild.SonarQube.Runner.exe begin /k:"HIDReaderManagerApp" /d:sonar.host.url="http://localhost:9000" /d:sonar.login="My Login Token"

错误:

适用于 MSBuild 4.0.2 的 SonarQube 扫描器 默认属性文件位于 /Users/akandasamy/Development/HIDProjects/sonar-scanner-msbuild-4.0.2.892/SonarQube.Analysis.xml 从 /Users/akandasamy/Development/HIDProjects/sonar-scanner-msbuild-4.0.2.892/SonarQube.Analysis.xml 加载分析属性 预处理开始。 正在准备工作目录... 17:29:10.391 正在更新构建集成目标... 17:29:10.414 正在获取分析配置设置... 17:29:10.517 请求和解析“http://localhost:9000/api/settings/values?component=HIDReaderManagerApp”失败:远程服务器返回错误:(401)。 17:29:10.517 连接到 SonarQube 服务器时无法授权。检查您的凭据并重试。 17:29:10.518 预处理失败。退出代码:1

当使用 component 参数时,api/settings/values API 需要 Browse 权限。请查看您正在验证的用户是否具有上述权限。

有关安全和权限的更多详细信息,请参见此处: https://docs.sonarqube.org/latest/instance-administration/security