首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >用声纳制作时出错。未经授权

用声纳制作时出错。未经授权
EN

Stack Overflow用户
提问于 2016-08-31 19:51:31
回答 1查看 1.4K关注 0票数 5

我试图将sonarqube与TFS集成在一起,我创建了一个只需一个步骤的构建定义,即声呐qube集成,基于本教程:

  1. https://blogs.msdn.microsoft.com/visualstudioalm/2015/08/24/build-tasks-for-sonarqube-analysis/

我知道我的sonarqube已经安装好了,因为我可以通过浏览器访问它,而且数据库已经正确设置了。

但是,我得到了这个错误:

代码语言:javascript
复制
14:45:53.684  Default properties file was not found at C:\BuildAgents\DefaultBuildAgent\5\.sonarqube\bin\SonarQube.Analysis.xml
14:45:53.762  Updating build integration targets...
14:45:53.84  Fetching analysis configuration settings...
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, String projectBranch)
at SonarQube.TeamBuild.PreProcessor.TeamBuildPreProcessor.FetchArgumentsAndRulesets(ISonarQubeServer server, ProcessedArgs args, TeamBuildSettings settings, IDictionary`2& serverSettings, AnalyzerSettings& analyzerSettings)
at SonarQube.TeamBuild.PreProcessor.TeamBuildPreProcessor.DoExecute(ProcessedArgs args)
at SonarQube.TeamBuild.PreProcessor.TeamBuildPreProcessor.Execute(String[] args)
at SonarQube.TeamBuild.PreProcessor.Program.Main(String[] args)
Pre-processing succeeded.
Unexpected exit code received from batch file: 255
******************************************************************************
Finishing task: SonarQubePreBuild
******************************************************************************
Task SonarQubePreBuild failed. This caused the job to fail. Look at the logs for the task for more details.
******************************************************************************
Finishing Build
******************************************************************************
Worker Worker-28c6fdb7-9350-4b65-bbba-0e9aab5e0e83 finished running job 28c6fdb7-9350-4b65-bbba-0e9aab5e0e83
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-01-30 12:16:54

您需要在TFS: SonarQube中的SonarQube服务端点中指定身份验证令牌。

要在SonarQube中获取用户令牌,请遵循这些步骤

确保sonar.login和sonar.password属性在SonarQube.Analysis.xml中被注释掉,否则令牌不会被使用。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39257906

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档