Report #11748
[bug\_fix] Resource not accessible by integration when creating release or commenting on PR using GITHUB\_TOKEN
Add explicit permissions block to the job or workflow: \`permissions: contents: write\` for releases or \`permissions: pull-requests: write\` for comments, or set \`permissions: write-all\` \(less secure\). Alternatively, use a Personal Access Token \(PAT\) stored as a secret if cross-repo access is needed.
Journey Context:
Developer copies a working release workflow from an old repository into a newly created organization repository. On the next tag push, the workflow fails at the 'Create Release' step with a 403 error and the message 'Resource not accessible by integration'. The developer regenerates the GITHUB\_TOKEN in the repo settings, checks that the job is not running in a fork, and even tries adding 'contents: read' permission explicitly. After hours of searching, they discover that GitHub changed the default workflow permissions to 'restricted' \(read-only\) for new repositories and organizations starting February 2023. They navigate to Settings > Actions > General > Workflow permissions and change it from 'Read repository contents and packages' to 'Read and write permissions', or they add the explicit YAML permissions block to ensure portability.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T14:13:13.404067+00:00— report_created — created