# ERROR: Error during SonarScanner execution You're not authorized to run analysis. Please contact the project administrator

**URL:** <https://community.sonarsource.com/t/error-error-during-sonarscanner-execution-youre-not-authorized-to-run-analysis-please-contact-the-project-administrator/47977>\
**Category:** SonarQube Cloud\
**Created:** [August 11, 2021, 4:44pm UTC](https://community.sonarsource.com/t/error-error-during-sonarscanner-execution-youre-not-authorized-to-run-analysis-please-contact-the-project-administrator/47977 "2021-08-11T16:44:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![acki](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/acki/32/24825_2.png) [@acki](https://community.sonarsource.com/u/acki)\
**Post date:** [August 11, 2021, 4:44pm UTC](https://community.sonarsource.com/t/error-error-during-sonarscanner-execution-youre-not-authorized-to-run-analysis-please-contact-the-project-administrator/47977/1 "2021-08-11T16:44:21Z")

</div>

I am analyzing an open source project with it. The user should have access to run an analysis.  
However, I still get:

```auto
 16:41:10.637 DEBUG: POST 403 https://sonarcloud.io/api/ce/submit?organization=rttrorg&projectKey=rttrorg_rttr&projectName=rttr&characteristic=pullRequest%3D315 | time=1141ms
16:41:10.659 INFO: ------------------------------------------------------------------------
16:41:10.659 INFO: EXECUTION FAILURE
16:41:10.660 INFO: ------------------------------------------------------------------------
16:41:10.660 INFO: Total time: 5:12.867s
16:41:10.725 INFO: Final Memory: 9M/34M

```

Github Job: [code-quality: add sonar source analysis · rttrorg/rttr@5a847b4 · GitHub](https://github.com/rttrorg/rttr/runs/3303105395?check_suite_focus=true)

PR: [code-quality: add sonar source analysis by acki-m · Pull Request #315 · rttrorg/rttr · GitHub](https://github.com/rttrorg/rttr/pull/315/)

What setting is missing?

---

<div class="post-metadata">

**Author:** ![Claire\_Villard](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/claire_villard/32/27065_2.png) [@Claire\_Villard](https://community.sonarsource.com/u/Claire_Villard)\
**Post date:** [August 12, 2021, 9:25am UTC](https://community.sonarsource.com/t/error-error-during-sonarscanner-execution-youre-not-authorized-to-run-analysis-please-contact-the-project-administrator/47977/2 "2021-08-12T09:25:33Z")

</div>

Hi @acki , welcome to the community forum.

Thanks for the links to the PR!  
I see you are trying to analyze the PR from a fork. This feature is currently not supported for CI-based analysis, only for automatic analysis.  
It’s already identified on our side, but not planned (some links to follow the progress are on [this other thread](https://community.sonarsource.com/t/how-to-use-sonarcloud-with-a-forked-repository-on-github/7363)). You can also vote on that issue: [SonarCloud analyzes external Pull Request - SonarCloud | Product Roadmap](https://portal.productboard.com/sonarsource/1-sonarcloud/c/50-sonarcloud-analyzes-external-pull-request)

Claire

---

<div class="post-metadata">

**Author:** ![acki](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/acki/32/24825_2.png) [@acki](https://community.sonarsource.com/u/acki)\
**Post date:** [August 12, 2021, 10:47am UTC](https://community.sonarsource.com/t/error-error-during-sonarscanner-execution-youre-not-authorized-to-run-analysis-please-contact-the-project-administrator/47977/3 "2021-08-12T10:47:40Z")

</div>

actually the analysis is not running on the fork, here you can see:  
[https://github.com/acki-m/rttr/actions](https://github.com/acki-m/rttr/actions)

No `analyze with sonar source` action

I also added a check whether the action is running on a fork:  
[https://github.com/rttrorg/rttr/pull/315/files#diff-9a3216554898843f8508e7d7f4e77d2bbd65b77ae944c56a55aa263c0c53af3bR18](https://github.com/rttrorg/rttr/pull/315/files#diff-9a3216554898843f8508e7d7f4e77d2bbd65b77ae944c56a55aa263c0c53af3bR18)

So what should I do now?

---

<div class="post-metadata">

**Author:** ![acki](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/acki/32/24825_2.png) [@acki](https://community.sonarsource.com/u/acki)\
**Post date:** [August 12, 2021, 9:04pm UTC](https://community.sonarsource.com/t/error-error-during-sonarscanner-execution-youre-not-authorized-to-run-analysis-please-contact-the-project-administrator/47977/4 "2021-08-12T21:04:48Z")

</div>

@Claire_Villard  
Okay no when I create a PR from a branch inside the repo it works, sonar cube could upload the report.  
And really zero vulnerabilities? Can’t believe it.

However, can you tell me how I can prevent this specific job running, when I got a PR from a fork?

---

<div class="post-metadata">

**Author:** ![Claire\_Villard](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/claire_villard/32/27065_2.png) [@Claire\_Villard](https://community.sonarsource.com/u/Claire_Villard)\
**Post date:** [August 13, 2021, 6:48am UTC](https://community.sonarsource.com/t/error-error-during-sonarscanner-execution-youre-not-authorized-to-run-analysis-please-contact-the-project-administrator/47977/5 "2021-08-13T06:48:52Z")

</div>

TBH, I don’t know, this is related to Github workflows and not to SonarSource products, and I never tried that so I can’t help.  
I found that [forum post](https://github.community/t/have-github-action-only-run-on-master-repo-and-not-on-forks/140840/14) that gives solutions to a similar problem, maybe it could help.

Claire
