GitHub Actions "Resource not accessible by personal access token" (fine-grained)
Fine-grained PATs grant narrow per-permission scopes per repository. A call fails with 403 when the token has access to the repo but not the specific permission (contents, pull-requests, issues, etc.) the call needs.
What this error means
A step using a fine-grained PAT fails with resource not accessible by personal access token.
github-actions
RequestError [HttpError]: Resource not accessible by personal access token
status: 403Common causes
Missing fine-grained permission
The PAT lacks the exact permission (e.g. Pull requests: write) the operation requires.
Repository not selected
The fine-grained PAT does not include the target repository in its allowed list.
How to fix it
Grant the needed permission
- Edit the fine-grained PAT under Developer settings.
- Add the specific repository and grant the exact permission (e.g. Contents: write, Pull requests: write).
- Update the secret holding the token and re-run.
How to prevent it
- Map each automation to the minimal fine-grained permissions it needs.
- Prefer GITHUB_TOKEN with a permissions block when no cross-repo access is required.
Related guides
GitHub Actions "Resource not accessible by personal access token"Fix GitHub Actions "Resource not accessible by personal access token" - a PAT missing the required scope, or…
GitHub Actions GITHUB_TOKEN cannot trigger another workflowFix the GitHub Actions behavior where events created with the default GITHUB_TOKEN do not trigger further wor…
actions/github-script "Resource not accessible by integration" (contents: write missing)Fix actions/github-script "Resource not accessible by integration" caused by a missing contents: write (or ot…