Skip to content
AuthenticationDeploymentGitHub

GitHub Actions Artifact Upload Returns 403 for a Forked Pull Request

A workflow can build tests but receives HTTP 403 when attempting to upload an artifact from a forked pull request. This guide explains the affected workflow, risk boundaries and what a successful fix looks like.

Quick Answer

First, check event type, fork security restrictions and the effective GITHUB_TOKEN permissions separately from repository secrets. Then use the supported upload-artifact action and store safe build output without elevating pull-request permissions; adjust workflow design through reviewed repository settings. Finally, a test workflow from an authorized branch uploads its permitted artifact, and fork workflows remain least-privileged.

A workflow can build tests but receives HTTP 403 when attempting to upload an artifact from a forked pull request. The goal is to restore the intended workflow while preserving original files, permissions and recovery options.

Recognize the exact symptom

Observed behavior: A workflow can build tests but receives HTTP 403 when attempting to upload an artifact from a forked pull request. Record the exact app or device build, affected account or file, and the first time this happened. A screenshot of the error state or a short log excerpt is useful when it contains no sensitive information.

Control comparison: Check event type, fork security restrictions and the effective GITHUB_TOKEN permissions separately from repository secrets. Keep the account, file, network and hardware unchanged wherever the comparison permits. If the control works, the difference between the two paths is your most useful clue.

  • Does this reproduce every attempt, or only after a reboot, resume, update or account switch?
  • Can the affected action complete through another supported route without changing the original data?
  • Is the problem limited to one file, one profile, one device or every user of the service?

Why a controlled comparison matters

Separate permission, runtime, network and version failures from the application symptom. An environment-specific error should be reproduced under the same dependency versions.

Focused investigation: Inspect job permissions and artifact service error details; distinguish an action compatibility error from restricted fork execution. Treat this as a way to test a cause, not proof that the cause has already been established.

What you observe What to check next
The controlled comparison succeeds Compare the settings, permissions or content specific to the failing path.
Both original and control fail Check the shared device, account, network or service dependencies before changing the application.
It works only after a fresh start Inspect background processes, cache state, session expiry or a reconnect sequence.

Keep your data safe

Run diagnostics only in projects and systems you administer. Save the relevant configuration, secrets must stay out of logs, and test changes in a non-production environment first.

Save the current configuration, note its values, and use a harmless test item where possible. Avoid combining this repair with unrelated updates. In particular, Do not use pull_request_target with untrusted checkout code to bypass security restrictions.

Step-by-Step Troubleshooting

Choose Beginner for reversible checks or Advanced for targeted diagnostics.

Capture the exact symptom

A workflow can build tests but receives HTTP 403 when attempting to upload an artifact from a forked pull request. Confirm the affected product, user account, file or device, then record the time and a screenshot without private account information. This is the baseline; do not change settings yet.

Use a supported comparison

Check event type, fork security restrictions and the effective GITHUB_TOKEN permissions separately from repository secrets. Perform the comparison with one harmless test item. Write down both the successful and failing paths so that the next action targets the actual difference.

Apply the narrow repair

Use the supported upload-artifact action and store safe build output without elevating pull-request permissions; adjust workflow design through reviewed repository settings. Change one setting or workflow at a time. Preserve an easy route back to the previous configuration and allow any synchronization, indexing or activation step to complete before retesting.

Test the original workflow

A test workflow from an authorized branch uploads its permitted artifact, and fork workflows remain least-privileged. Test the original failing situation rather than an unrelated feature. If it passes, repeat after one normal restart or reconnect; if it fails, restore temporary diagnostic settings and use the Advanced track.


Solution Checklist

0/12 completed

Risky assumptions

  • Do not use pull_request_target with untrusted checkout code to bypass security restrictions.
  • Do not treat a successful unrelated feature as evidence that the failing action is fixed; run the original comparison again.
  • Do not erase logs, synced files or working credentials before you know which layer was responsible.

Prove the fix

Pass condition: A test workflow from an authorized branch uploads its permitted artifact, and fork workflows remain least-privileged. Repeat the same test using the original account, document, peripheral or network path; a passing test on a substitute is useful evidence but is not the final result.

For intermittent problems, repeat the operation after a normal application restart and again after the state change that originally triggered it, such as reconnecting a dock, signing in, or resuming from sleep. Check for new errors in the same location as the original symptom.

If the symptom remains

If the controlled test still fails, return temporary settings to their earlier state and collect the minimum relevant evidence. Next diagnostic: Inspect job permissions and artifact service error details; distinguish an action compatibility error from restricted fork execution. Note exactly which comparison failed and what changed after the attempted repair.

For managed devices, privacy-sensitive files, damaged storage or account security concerns, escalate to the responsible administrator or vendor with timestamps and non-sensitive logs rather than attempting a broad reset.

Maintenance notes

Pin critical tool versions where appropriate, review permissions in code and preserve non-production reproduction instructions for future failures.

When the system is stable, record the specific working change: Use the supported upload-artifact action and store safe build output without elevating pull-request permissions; adjust workflow design through reviewed repository settings. Keep this as a reversible troubleshooting record so a later upgrade does not require repeating unrelated repair attempts.

Official Resources

For product-specific procedures and limitations, consult GitHub Docs — Pull-request events and fork permissions.

Did this solution fix your problem?

Optional feedback helps us improve this guide. Never send private data.

PRBLEM / COMMUNITY

Discuss This Solution

Ask a question, compare results, or share a safe fix that worked for you.

Describe the exact issueInclude the error, device or software version, and what you already tried.
Protect your informationNever post passwords, recovery codes, private logs or personal data.
Retry if the discussion does not load

Disqus hosts the discussion. Comments load automatically as you approach this section and may use cookies.

Can't find your answer?

Tell our editors which problem needs a guide. Do not include passwords, API keys, email addresses, private URLs, or full error logs.

Analyze Error

Paste an error message to identify its likely category. Analysis takes place in your browser; only a short error category will be used if you choose to search.

Do not paste passwords, tokens, private URLs or full logs.