# No SonarCloud Analysis available for PRs from fork

**URL:** <https://community.sonarsource.com/t/no-sonarcloud-analysis-available-for-prs-from-fork/132569>\
**Category:** SonarQube Cloud\
**Tags:** maven, sonarqube-cloud\
**Created:** [December 21, 2024, 10:43pm UTC](https://community.sonarsource.com/t/no-sonarcloud-analysis-available-for-prs-from-fork/132569 "2024-12-21T22:43:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dedece35](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/dedece35/32/58432_2.png) [@dedece35](https://community.sonarsource.com/u/dedece35)\
**Post date:** [December 21, 2024, 10:43pm UTC](https://community.sonarsource.com/t/no-sonarcloud-analysis-available-for-prs-from-fork/132569/1 "2024-12-21T22:43:51Z")

</div>

Hello,

Could I have some news about this problem [Make it possible for PR's from forks to run the SonarCloud scan · Issue #234 · Altinn/app-frontend-react · GitHub](https://github.com/Altinn/app-frontend-react/issues/234) ?  
Currently, in my open-source project ([GitHub - green-code-initiative/creedengo-rules-specifications: Reduce the environmental footprint of your software programs with SonarQube](https://github.com/green-code-initiative/creedengo-rules-specifications)), I have some forks which want to merge some commits into my original project. But, when a PR from one fork is created on my original project, we have an error when trying to communicate with SonarCloud (like original project branches already do) :  
“Error: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:5.0.0.4389:sonar (default-cli) on project creedengo-rules-specifications: Error status returned by url [[https://api.sonarcloud.io/analysis/jres?os=linux&arch=x86\_64](https://api.sonarcloud.io/analysis/jres?os=linux&arch=x86_64)]: 401 → [Help 1]”  
example : [test ddc - egry35 · green-code-initiative/creedengo-rules-specifications@6370659 · GitHub](https://github.com/green-code-initiative/creedengo-rules-specifications/actions/runs/12448924898/job/34754023000)

As I see in issue [Make it possible for PR's from forks to run the SonarCloud scan · Issue #234 · Altinn/app-frontend-react · GitHub](https://github.com/Altinn/app-frontend-react/issues/234), it seems to be a problem already known.  
But if no solution is possible, how can I check if a PR created from a fork is Ok for SonarCloud to accept it ? (quality gate, issues, …)

Thank you for answer.  
Best regards.  
David.

---

<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:** [December 23, 2024, 8:53am UTC](https://community.sonarsource.com/t/no-sonarcloud-analysis-available-for-prs-from-fork/132569/2 "2024-12-23T08:53:44Z")

</div>

Hey @dedece35

SonarQube Cloud supports the analysis of PRs from forks when using [Automatic Analysis](https://docs.sonarsource.com/sonarqube-cloud/advanced-setup/automatic-analysis/). The primary downside of this is that you won’t have coverage information included in the results.

Analyzing PRs from forks using CI-based analysis is a problem since it involves exposing a SonarQube Cloud token to contributors. [Some users have tried to find workarounds to this](https://community.sonarsource.com/t/how-to-use-sonarcloud-with-a-forked-repository-on-github/7363/34), but they are fairly complicated and not well-supported.

Ideally, we would find a way to [integrate test and coverage reports into Automatic Analysis](https://portal.productboard.com/sonarsource/1-sonarqube-cloud/c/49-automatic-analysis-includes-test-and-coverage-reports?&utm_medium=social&utm_source=starter_share), leaving that as the complete solution to support analysis of PRs from forked repos.
