2016-07-20 4 views
2

sonarqube 5.5 mehrere Java-Projekte, alle haben die Berechtigung für jedermann kann die Analyse ausführen. Verwendung mvn Sonar: Sonar zu Analyse Andere Projekte funktionieren ohne Fehler. Ein Projekt hat den Berechtigungssatz nicht gefunden. Es gab:Sonarqube-Analyse erfordert Authentifizierung, wenn die Berechtigung ist jemand

Nicht autorisiert. Das Analysieren dieses Projekts muss authentifiziert werden. Bitte geben Sie die Werte der Eigenschaften sonar.login und sonar.password an.

Das Festlegen der Berechtigung behebt es nicht. Dieses Projekt gibt weiterhin diesen Fehler aus.

Schritte unternommen:

  • Berechtigungssatz auf der Projekt Seite Berechtigungen wird, Anyone Gruppe Hinzufügen ANALYSE Erlaubnis auszuführen. Benutzer 0, Gruppen 1

  • Toggle Permission aus- und wieder einschalten.

  • Server neu starten.
  • entfernen lokalen Sonar/cache

Es gibt zwei Projekte mit dem gleichen Namen, aber unterschiedlichen Schlüsseln. QA-Version und Release.

Nicht sicher, was als nächstes zu versuchen ist.


------ kurz log --- mvn -X folgt

[INFO] 
[INFO] --- sonar-maven-plugin:3.0.2:sonar (default-cli) @ adminportal-api --- 
[INFO] User cache: /Users/kenhargreaves/.sonar/cache 
[INFO] Load global repositories 
[INFO] Load global repositories (done) | time=265ms 
[INFO] User cache: /Users/kenhargreaves/.sonar/cache 
[INFO] Exclude plugins: devcockpit, buildstability, pdfreport, report, scmstats, buildbreaker, views, jira 
[INFO] Load plugins index 
[INFO] Load plugins index (done) | time=16ms 
[INFO] SonarQube version: 5.5 
[INFO] Default locale: "en_US", source code encoding: "UTF-8" 
[INFO] -- Cache for project [com.fusemail:adminportal-api] not found, synchronizing data.. 
[INFO] Load rules 
[INFO] Load rules (done) | time=244ms 
[INFO] Load project settings 
[INFO] Load project settings (done) | time=182ms 
[INFO] Load project quality profiles 
[INFO] Load project quality profiles (done) | time=59ms 
[INFO] Load project active rules 
[INFO] Load project active rules (done) | time=888ms 
[INFO] Load server issues 
[INFO] Load server issues (done) | time=844ms 
[INFO] Load user information 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 8.221 s 
[INFO] Finished at: 2016-07-22T11:39:38-07:00 
[INFO] Final Memory: 65M/470M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.0.2:sonar (default-cli) on project adminportal-api: Not authorized. Analyzing this project requires to be authenticated. Please provide the values of the properties sonar.login and sonar.password. -> [Help 1] 
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 
[ERROR] Re-run Maven using the -X switch to enable full debug logging. 
[ERROR] 

----------------- 
INFO] Default locale: "en_US", source code encoding: "UTF-8" 
[DEBUG] Work directory: /Users/kenhargreaves/Documents/workspace/fm-api-portalapi/target/sonar 
[DEBUG] Execution getVersion 
[DEBUG] Execution execute 
[DEBUG] cache: /Users/kenhargreaves/.sonar/ws_cache/http%3A%2F%2Fsonarqube.electric.net/5.5/projects/com.fusemail%3Aadminportal-api 
[INFO] -- Cache for project [com.fusemail:adminportal-api] not found, synchronizing data.. 
[INFO] Load rules 
[DEBUG] GET 200 http://sonarqube.electric.net/api/rules/list.protobuf | time=100ms 
[INFO] Load rules (done) | time=176ms 
[INFO] Load project settings 
[DEBUG] GET 200 http://sonarqube.electric.net/batch/project.protobuf?key=com.fusemail%3Aadminportal-api&issues_mode=true | time=53ms 
[INFO] Load project settings (done) | time=158ms 
[INFO] Load project quality profiles 
[DEBUG] GET 200 http://sonarqube.electric.net/api/qualityprofiles/search.protobuf?projectKey=com.fusemail%3Aadminportal-api | time=41ms 
[INFO] Load project quality profiles (done) | time=53ms 
[INFO] Load project active rules 
[DEBUG] GET 200 http://sonarqube.electric.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives&activation=true&qprofile=c-sonar-way-50322&p=1&ps=500 | time=128ms 
[DEBUG] GET 200 http://sonarqube.electric.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives&activation=true&qprofile=cpp-sonar-way-23842&p=1&ps=500 | time=160ms 
[DEBUG] GET 200 http://sonarqube.electric.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives&activation=true&qprofile=java-sonar-03590&p=1&ps=500 | time=64ms 
[DEBUG] GET 200 http://sonarqube.electric.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives&activation=true&qprofile=js-sonar-way-84357&p=1&ps=500 | time=103ms 
[DEBUG] GET 200 http://sonarqube.electric.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives&activation=true&qprofile=objc-sonar-way-52782&p=1&ps=500 | time=123ms 
[DEBUG] GET 200 http://sonarqube.electric.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives&activation=true&qprofile=py-sonar-way-75611&p=1&ps=500 | time=69ms 
[INFO] Load project active rules (done) | time=728ms 
[INFO] Load server issues 
[DEBUG] GET 200 http://sonarqube.electric.net/batch/issues.protobuf?key=com.fusemail%3Aadminportal-api | time=333ms 
[INFO] Load server issues (done) | time=524ms 
[INFO] Load user information 
[DEBUG] GET 401 http://sonarqube.electric.net/batch/users?logins=axxx.mxxxx | time=31ms 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 8.647 s 
[INFO] Finished at: 2016-07-22T11:42:01-07:00 
[INFO] Final Memory: 66M/467M 

Der Benutzer wir dort sehen, ein Konto in der Sonarqube Server hatte, habe ich ihn entfernen, was zu sehen das passiert.

+0

Können Sie bitte bitte das vollständige Protokoll einfügen? Ich muss genau sehen, wo das scheitert. –

+0

Außerdem verwenden Sie die Eigenschaft sonar.branch oder sind die ursprünglichen Schlüssel anders? –

+0

Sonar.branch wird nicht verwendet. Die Schlüssel für die beiden Projekte sind unterschiedlich. –

Antwort

0

hatte ich das gleiche Problem und beheben könnte

von Modul die Konfiguration Sonarqube bewegen build.gradlebuild.gradle App.

sonarqube { 
    properties { 
     property "sonar.host.url", System.getenv("SONAR_URL_KEY") 
     property "sonar.login", System.getenv("SONAR_LOGIN_KEY") 
     ... 
    } 
} 
Verwandte Themen