Report #54312
[bug\_fix] HttpError: Resource not accessible by integration \(403\) when creating release, pushing to ghcr.io, or commenting on PRs using GITHUB\_TOKEN
Add explicit permissions to the job or workflow using the \`permissions:\` key \(e.g., \`permissions: contents: write packages: write\`\). The default \`GITHUB\_TOKEN\` is restricted to read-only for most scopes unless the repository's 'Workflow permissions' setting is changed or the YAML declares it.
Journey Context:
A developer configures a workflow to run \`semantic-release\` or \`actions/create-release\` on push to \`main\`. The job fails with a 403 error during the 'Create Release' step. The developer verifies the token is \`secrets.GITHUB\_TOKEN\` and not a PAT. They check the repository settings under Actions > General > Workflow permissions and see it is set to 'Read repository contents and packages' \(the default\). Realizing the workflow file itself never requested elevated permissions, they add \`permissions: contents: write\` to the job definition. On the next run, the token is granted the necessary scope and the release is created successfully.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T21:39:40.926292+00:00— report_created — created