SonarQube Msbuild Runner和Jenkins未经授权的错误 [英] SonarQube Msbuild Runner and Jenkins Unauthorized Error

查看:339
本文介绍了SonarQube Msbuild Runner和Jenkins未经授权的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am getting the following error when trying to run Sonarqube MSBuild Runner with Jenkins. I am using SonarQube 4.5 and MSBuild SonarQube Runner 1.1. Any suggestions on how to resolve?

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.

推荐答案

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

You need to look at the configuration file SonarQube.Analysis.xml. Confirm that the property sonar.host.url is correct and you have configured a valid sonar.login and sonar.password. The user you specified must be able to execute analysis. Open the SonarQube portal as admin and activate Administration - Security - Global Permissions. The user must be specified in Execute Analysis or must be a member of a group specified in Execute Analysis. Provide more details if this does not help

这篇关于SonarQube Msbuild Runner和Jenkins未经授权的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆