Report #6827
[bug\_fix] "Resource not accessible by integration" or 403 Forbidden when creating GitHub Releases, pushing to GHCR, or posting PR comments using the default GITHUB\_TOKEN.
Explicitly declare the required permissions at the job or workflow level \(e.g., \`permissions: contents: write\` for releases, \`permissions: packages: write\` for GHCR, or \`permissions: pull-requests: write\` for comments\). Since February 2023, new repositories and organizations default to restrictive read-only token permissions.
Journey Context:
Developer creates a workflow triggered on tag push that uses \`softprops/action-gh-release\` to create a GitHub Release. It works perfectly on their personal repository, but when migrated to an organization repository, the job fails with "Resource not accessible by integration". After verifying the token is being passed, they check the repository Settings > Actions > General and discover "Workflow permissions" is set to "Read repository contents and packages permissions". They initially try switching the org default to "Read and write permissions", but security teams object. The correct fix is adding \`permissions: contents: write\` directly in the workflow YAML, explicitly declaring the required capability for that specific job without changing org-wide defaults.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T01:10:38.800387+00:00— report_created — created