我设置了SonarQube服务器,并在TFS2017构建过程中包含了BuildTask步骤。 TFS是一种内部部署设置。401使用TFS2017进行未经授权的Sonarqube分析
在“完整SonarQube分析”构建步骤,我收到以下错误:
2017-01-30T08:54:30.7388183Z 09:54:30.676 Post-processing succeeded.
2017-01-30T08:54:32.1607278Z ##[error]System.Management.Automation.CmdletInvocationException: {"err_code":401,"err_msg":"Unauthorized"} ---> System.Net.WebException: Der Remoteserver hat einen Fehler zurückgegeben: (401) Nicht autorisiert.
2017-01-30T08:54:32.1607278Z bei Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)
2017-01-30T08:54:32.1607278Z bei Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()
2017-01-30T08:54:32.1607278Z --- Ende der internen Ausnahmestapelüberwachung ---
2017-01-30T08:54:32.1607278Z bei System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
2017-01-30T08:54:32.1607278Z bei System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
2017-01-30T08:54:32.1607278Z bei System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
2017-01-30T08:54:32.1607278Z bei System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
2017-01-30T08:54:32.1607278Z bei System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
2017-01-30T08:54:32.1607278Z bei Microsoft.TeamFoundation.DistributedTask.Handlers.LegacyVSTSPowerShellHost.VSTSPowerShellHost.Main(String[] args)
2017-01-30T08:54:32.1763500Z ##[error]LegacyVSTSPowerShellHost.exe completed with return code: -1.
2017-01-30T08:54:32.1763500Z ##[section]Finishing: Complete the SonarQube analysis
作为分析结束后,我以为这是某种形式记录由SonarQube完成之后。
构建代理程序安装在服务器A上,安装在服务器B上的SonarQube上。“准备步骤”构建任务完成而没有错误,因此我假设基本SonarQube安装程序可以。我安装了SonarQube 5.6.5 LTS和SonarQube.Analysis.xml中提供的Sonar User,它是默认的管理员/管理员用户。
有什么建议吗?
Thx为您的回复,它的工作 - 虽然我忘了评论SonarQube.Analysis.xml中的sonar.login和sonar.password属性,它保持它从第一个地方成功。我会将其添加到您的答案中。 – phifi
感谢您的评论:)我将添加一个新的问题到我们的bug跟踪器,不得不从XML中删除登录/密码属性看起来像需要注意的事情。 –
很高兴知道。如果它是公开的,你可以把链接放在这里,以便我们跟踪这个问题。另外我有我的sonarqube设置质疑[这里](http://stackoverflow.com/questions/41953929/timout-on-sonarqube-analysis-on-tfs2017)另一个问题。您的帮助将不胜感激:) – phifi