Report #36862
[bug\_fix] "Resource not accessible by integration" or 403 Forbidden when creating releases, issues, comments, or packages using GITHUB\_TOKEN
Add explicit permissions to the workflow or job: \`permissions: contents: write\` \(or \`packages: write\`, \`issues: write\`, etc.\). Root cause: GitHub changed the default GITHUB\_TOKEN permissions from read/write \(permissive\) to read-only \(restricted\) for new repositories in February 2023. Without explicit \`permissions\` blocks, the token cannot write to repository resources.
Journey Context:
A developer migrates a working release workflow to a new repository. The workflow uses \`softprops/action-gh-release\` to create a GitHub Release. On the new repo, the job fails instantly with "Resource not accessible by integration". The developer spends hours checking repository settings, verifying the workflow trigger, and regenerating the GITHUB\_TOKEN by re-running the job. They suspect organization-level security policies are blocking writes. After searching the exact error message, they find a GitHub blog post about the February 2023 change to default workflow permissions. They realize the new repository has "Read repository contents" as the default permission. Adding \`permissions: contents: write\` to the job immediately resolves the issue, revealing the token was restricted by default.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T16:20:39.161852+00:00— report_created — created