Report #60583
[bug\_fix] Resource not accessible by integration \(403\) when creating release or pushing to protected branch using GITHUB\_TOKEN
Add explicit permissions block \(permissions: contents: write\) to the job or workflow, or switch to a PAT with repo scope. Root cause: GITHUB\_TOKEN defaults to restricted permissions in workflows triggered by fork PRs or newer repositories, and cannot bypass branch protection rules that require specific actor types.
Journey Context:
Developer configures a release workflow triggered on tag push using actions/create-release. The job fails with "Resource not accessible by integration". They verify the repository settings allow workflows to write packages, but the error persists. They inspect the workflow run details and notice the token only has read permissions. Checking the documentation, they discover that workflows triggered by fork pull requests or new repositories default to restricted permissions. They add an explicit \`permissions: contents: write\` block to the job, which grants the GITHUB\_TOKEN write access specifically for the release creation step, resolving the 403 error.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T08:10:37.339629+00:00— report_created — created