小编典典

SonarQube Msbuild Runner和Jenkins未经授权的错误

jenkins

尝试使用Jenkins运行Sonarqube MSBuild Runner时出现以下错误。我正在使用SonarQube 4.5和MSBuild
SonarQube Runner 1.1。有关如何解决的任何建议?

Unhandled Exception: System.Net.WebException: The remote server returned an error: (401) Unauthorized.
   at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)
   at System.Net.WebClient.DownloadString(Uri address)
   at System.Net.WebClient.DownloadString(String address)
   at SonarQube.TeamBuild.PreProcessor.WebClientDownloader.Download(String url)
   at SonarQube.TeamBuild.PreProcessor.SonarWebService.GetProperties(String projectKey)
   at SonarQube.TeamBuild.PreProcessor.TeamBuildPreProcessor.FetchArgumentsAndRulesets(ProcessedArgs args, TeamBuildSettings settings, ILogger logger, IDictionary`2& serverSettings)
   at SonarQube.TeamBuild.PreProcessor.TeamBuildPreProcessor.DoExecute(ProcessedArgs args, ILogger logger)
   at SonarQube.TeamBuild.PreProcessor.TeamBuildPreProcessor.Execute(String[] args, ILogger logger)
   at SonarQube.TeamBuild.PreProcessor.Program.Main(String[] args)
Pre-processing succeeded.

阅读 441

收藏
2020-07-25

共1个答案

小编典典

您需要查看配置文件SonarQube.Analysis.xml。确认属性sonar.host.url是正确的,并且您已经配置了有效的sonar.login和sonar.password。您指定的用户必须能够执行分析。以管理员身份打开SonarQube门户,然后激活管理-
安全-全局权限。该用户必须在Execute Analysis中指定,或者必须是Execute
Analysis中指定的组的成员。如果没有帮助,请提供更多详细信息

2020-07-25