# You're not authorized to run analysis

**URL:** <https://community.sonarsource.com/t/youre-not-authorized-to-run-analysis/120074>\
**Category:** SonarQube Server / Community Build\
**Tags:** gitlab\
**Created:** [August 2, 2024, 3:57am UTC](https://community.sonarsource.com/t/youre-not-authorized-to-run-analysis/120074 "2024-08-02T03:57:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rakeshkhopade](https://avatars.discourse-cdn.com/v4/letter/r/df705f/32.png) [@rakeshkhopade](https://community.sonarsource.com/u/rakeshkhopade)\
**Post date:** [August 2, 2024, 3:57am UTC](https://community.sonarsource.com/t/youre-not-authorized-to-run-analysis/120074/1 "2024-08-02T03:57:28Z")

</div>

Must-share information (formatted with [Markdown](https://commonmark.org/help/)):  
\*sonarqube version 9.9.6 community LTS with plugins cnes report gen and dependancy check  
sonar is deployed using docker-compose  
integrated a sonar with gitlab and using it inside gitlab-ci and trying to run mvn but getting You’re not authorized to run analysis even providing all tokens with valid permissions to them previously work with single pom file but now we have maintaining multiple pom for single project and this particular scenario facing not authorized issue this is what i am using  
curl -Lj [https://github.com/cnescatlab/sonar-cnes-report/releases/download/4.2.0/sonar-cnes-report-4.2.0.jar](https://github.com/cnescatlab/sonar-cnes-report/releases/download/4.2.0/sonar-cnes-report-4.2.0.jar) -o sonar-cnes-report.jar --silent  
if [“$CI\_PIPELINE\_SOURCE” == “merge\_request\_event”]; then  
mvn sonar:sonar -Dsonar.host.url=$SONAR\_HOST\_URL -Dsonar.coverage.jacoco.xmlReportPaths=${CI\_PROJECT\_DIR}/${JACOCOTARGET} -Pcoverage -Dsonar.branch.name=$CI\_COMMIT\_REF\_NAME -Dsonar.java.binaries=. -Dsonar.projectName=$CI\_PROJECT\_NAME -Dsonar.dependencyCheck.jsonReportPath=target/dependency-check-report.json -Dsonar.dependencyCheck.htmlReportPath=target/dependency-check-report.html -Dsonar.login=$SONAR\_TOKEN -U -DskipTests  
mvn sonar:sonar -Dsonar.host.url=$SONAR\_HOST\_URL -Dsonar.coverage.jacoco.xmlReportPaths=${CI\_PROJECT\_DIR}/${JACOCOTARGET} -Pcoverage -Dsonar.pullrequest.key=$CI\_MERGE\_REQUEST\_IID -Dsonar.pullrequest.branch=$CI\_MERGE\_REQUEST\_SOURCE\_BRANCH\_NAME -Dsonar.pullrequest.base=$CI\_MERGE\_REQUEST\_TARGET\_BRANCH\_NAME -Dsonar.dependencyCheck.jsonReportPath=target/dependency-check-report.json -Dsonar.dependencyCheck.htmlReportPath=target/dependency-check-report.html -Dsonar.java.binaries=. -Dsonar.projectName=$CI\_PROJECT\_NAME -Dsonar.login=$SONAR\_TOKEN $MAVEN\_OPTS $MAVEN\_CLI\_OPTS $MAVENBUILDCMD -DskipTests  
java -jar sonar-cnes-report.jar --server $SONAR\_HOST\_URL --project $PROJECTKEY --token $SONAR\_GLOBAL\_TOKEN --branch $CI\_MERGE\_REQUEST\_SOURCE\_BRANCH\_NAME --disable-csv --disable-markdown --disable-spreadsheet --author CI\_USER  
elif [[“$CI\_COMMIT\_BRANCH” == “$CI\_COMMIT\_REF\_NAME” || -n “$CI\_COMMIT\_TAG”]]; then #elif [“$CI\_COMMIT\_BRANCH” == “$CI\_COMMIT\_REF\_NAME”]; then  
echo “mvn sonar:sonar -Dsonar.host.url=$SONAR\_HOST\_URL -Dsonar.qualitygate.wait=true -Dsonar.coverage.jacoco.xmlReportPaths=${CI\_PROJECT\_DIR}/${JACOCOTARGET} -Pcoverage -Dsonar.branch.name=$CI\_COMMIT\_REF\_NAME -Dsonar.java.binaries=. -Dsonar.projectName=$CI\_PROJECT\_NAME -Dsonar.dependencyCheck.jsonReportPath=target/dependency-check-report.json -Dsonar.dependencyCheck.htmlReportPath=target/dependency-check-report.html -Dsonar.login=$SONAR\_TOKEN -U -DskipTests || true”  
mvn sonar:sonar -Dsonar.host.url=$SONAR\_HOST\_URL -Dsonar.qualitygate.wait=true -Dsonar.coverage.jacoco.xmlReportPaths=${CI\_PROJECT\_DIR}/${JACOCOTARGET} -Pcoverage -Dsonar.branch.name=$CI\_COMMIT\_REF\_NAME -Dsonar.java.binaries=. -Dsonar.projectName=$CI\_PROJECT\_NAME -Dsonar.dependencyCheck.jsonReportPath=target/dependency-check-report.json -Dsonar.dependencyCheck.htmlReportPath=target/dependency-check-report.html -Dsonar.login=$SONAR\_TOKEN -U -DskipTests || true  
java -jar sonar-cnes-report.jar --server $SONAR\_HOST\_URL --project $PROJECTKEY --token $SONAR\_GLOBAL\_TOKEN --branch $CI\_COMMIT\_REF\_NAME --disable-csv --disable-markdown --disable-spreadsheet --author CI\_USER  
fi

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [August 5, 2024, 5:48am UTC](https://community.sonarsource.com/t/youre-not-authorized-to-run-analysis/120074/2 "2024-08-05T05:48:50Z")

</div>

Hey there.

I suggest attaching logs from your build. That will help someone help you.

---

<div class="post-metadata">

**Author:** ![rakeshkhopade](https://avatars.discourse-cdn.com/v4/letter/r/df705f/32.png) [@rakeshkhopade](https://community.sonarsource.com/u/rakeshkhopade)\
**Post date:** [August 5, 2024, 9:38am UTC](https://community.sonarsource.com/t/youre-not-authorized-to-run-analysis/120074/3 "2024-08-05T09:38:03Z")

</div>

Hi colin  
Thank you for your response  
the issue has been resolved
