An action fails with `HttpError: Resource not accessible by integration` (403) when commenting on a PR or adding a label.
IntermediateTroubleshootingGitHub, Actions and Pull Request Issues
Answer
Likely causes → The GITHUB_TOKEN lacks the needed permission (pull-requests: write, issues: write), the workflow sets a restrictive permissions: block, or the run comes from a fork or Dependabot with a read-only token.
Diagnose → In the run logs, expand "Set up job" → "GITHUB_TOKEN Permissions" to see what was granted.
Fix →
permissions:
contents: read
pull-requests: write
issues: write
For fork PRs, move the commenting to a workflow_run workflow triggered after the CI run.
Prevent → Declare permissions per job and check the "GITHUB_TOKEN Permissions" log section when debugging 403s.
More on GitHub, Actions and Pull Request Issues
A workflow step that pushes a version bump fails with `remote: Permission to org/repo.git denied to github-actions[bot].` and `The requested URL returned error: 403`.IntermediateA workflow pushes a commit or tag, but the workflow that should run on that push or tag never starts.IntermediateA container job fails on any Git command with `fatal: detected dubious ownership in repository at '/__w/app/app'`.IntermediateYour PR suddenly shows 340 changed files and dozens of commits you did not write.IntermediateThe PR is stuck on `Expected — Waiting for status to be reported` for a required check called `build`.IntermediateThe PR was approved, but merging shows "Review required" again after you pushed a small fix.Beginner