2016-08-31 21 views
5

Próbuję zintegrować sonarqube z TFS, stworzyłem definicję budować z tylko jeden krok, integracja sonar Qube, na podstawie tego tutoriala:Błąd podczas budowania w kolejce z sonarqube. Nieuprawnione

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

Znam swoje sonarqube jest już skonfigurowałem, ponieważ mogę uzyskać do niego dostęp za pośrednictwem przeglądarki, a baza danych jest poprawnie skonfigurowana.

Jednak ja dostaję ten błąd:

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 
+1

Jakie są uprawnienia do twojego projektu? Czy "Ktoś" ma pozwolenie na przeglądanie i wykonywanie analizy? Czy użytkownik, którego poświadczenia używasz? –

+0

Jestem nowicjuszem w sonarze, ale eksperymentuję z użytkownikiem w TFS, czy możesz wyjaśnić mi bardziej szczegółowo, zgodnie z tym adresem URL: https://blogs.msdn.microsoft.com/visualstudioalm/2015/08/24/build -tasks-for-sonarqube-analysis /, mówi, że w użytkowniku i haśle mogę wypełnić dowolny przykład: anonimowy/anonimowy i to jest dokładnie to, co zrobiłem, w tej chwili nie ma użytkowników w sonarqube, tylko admin –

+0

To powinno help: http://docs.sonarqube.org/display/SONAR/Authorization#Authorization-ProjectPermissions –

Odpowiedz

2

należy określić token uwierzytelniający w końcowym usług SonarQube w TFS: click!

Aby otrzymać token użytkownika w SonarQube śledzić these steps

Upewnij się, że właściwości sonar.login i sonar.password w SonarQube.Analysis.xml zostały skomentowane, w przeciwnym razie token nie zostanie użyty.

Powiązane problemy