2017-01-30 5 views
1

SonarQube 서버를 설치하고 TFS2017 빌드 프로세스에 BuildTask 단계를 포함 시켰습니다. TFS는 온 - 프레미스 설정입니다. 에401 Unauthorized Sonarqube Analysis with TFS2017

나는 다음과 같은 오류가 "완료 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 수행 로깅의 일종입니다 가정합니다.

빌드 에이전트가 서버 B에 설치된 SonarQube 서버에 설치됩니다. "준비 단계"빌드 작업이 오류없이 완료되므로 기본 SonarQube 설치가 정상입니다. SonarQube 5.6.5 LTS를 설치했고 SonarQube.Analysis.xml에 제공된 Sonar User가 기본 admin/admin 사용자입니다.

제안 사항?

SonarQube.Analysis.xml의 인증 속성을 사용하지 않는 빌드 작업, 당신은 TFS의 SonarQube 엔드 포인트에 인증 토큰을 지정해야

답변

2

: 여기 https://docs.sonarqube.org/display/SCAN/SonarQube+Endpoint

그리고은을 구하는 방법에 대한 기사입니다 SonarQube에서 토큰 : https://docs.sonarqube.org/display/SONAR/User+Token

말라 '는 처음부터 사람들을 주석 처리하면 SonarQube.Analysis.xml에 다시 sonar.login 및 sonar.password 특성을 언급하는 것을 잊지.

+0

답장을 보내 주시면 Thy가 작동합니다. SonarQube.Analysis.xml의 sonar.login 및 sonar.password 속성에 대한 설명을 잊어 버렸지 만 처음부터 성공하지 못했습니다. 나는 이것을 당신의 답에 추가 할 것입니다. – phifi

+0

의견을 주셔서 감사합니다 :) 나는 우리의 버그 추적기에 새로운 문제를 추가 할 것입니다. XML에서 로그인/암호 속성을 삭제해야 할 필요가있는 것처럼 보입니다. –

+0

알아두면 좋은 정보. 공개 된 경우 여기에 링크를 넣어 문제를 추적 할 수 있습니다. 또한 또 다른 문제가 내 sonarqube 설치 질문 [여기] (http://stackoverflow.com/questions/41953929/timout-on-sonarqube-analysis-on-tfs2017). 귀하의 도움을 많이 부탁드립니다 :) – phifi