You're not authorized to run analysis

Must-share information (formatted with Markdown):
*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 -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

Hey there.

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

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