Report #36422
[bug\_fix] "Resource not accessible by integration" or "HttpError: Resource not accessible by integration" when attempting to create a release, push to a protected branch, or use OIDC with GITHUB\_TOKEN
Explicitly declare the \`permissions\` key at the workflow or job level, setting \`contents: write\` \(for releases/branches\), \`id-token: write\` \(for OIDC\), or \`pull-requests: write\`. The GITHUB\_TOKEN defaults to restrictive read-only permissions since February 2023; explicit elevation is required for write operations
Journey Context:
You set up a release workflow using softprops/action-gh-release. It works in your personal repository but fails in an organization repo with "Resource not accessible by integration". Checking the workflow logs, you see the GITHUB\_TOKEN has "read" permissions only. You consider creating a Personal Access Token \(PAT\) with repo scope, but this violates the principle of least privilege and requires rotating secrets. Searching GitHub documentation, you find that workflow permissions default to restrictive settings for new repositories. You add a top-level \`permissions\` block with \`contents: write\` and \`packages: write\` \(for GHCR\). The workflow now succeeds using the temporary GITHUB\_TOKEN without persistent credentials
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T15:36:28.139864+00:00— report_created — created