`Error: Resource not accessible by integration` when a workflow tries to comment on a PR.
BeginnerTroubleshootingPermissions, Tokens & Secrets
Answer
Likely causes → GITHUB_TOKEN lacks pull-requests: write (or issues: write for the issues comments API), a job-level permissions block replaced the workflow-level one, or the PR is from a fork so the token is read-only.
Diagnose → The "Set up job" log section lists "GITHUB_TOKEN Permissions". Check github.event.pull_request.head.repo.fork.
Fix → Add permissions: pull-requests: write to that job; for forks use the workflow_run two-workflow pattern.
Prevent → Declare permissions per job and test fork PRs in a sandbox repo.
More on Permissions, Tokens & Secrets
`remote: Permission to devopsshack/shack-api.git denied to github-actions[bot]. fatal: unable to access 'https://github.com/devopsshack/shack-api/': The requested URL returned error: 403`Beginner`fatal: could not read Username for 'https://github.com': terminal prompts disabled` when cloning a second private repo.BeginnerA secret is empty in the workflow even though it is set in Settings.Beginner`Error: Input required and not supplied: token` on a fork PR.BeginnerReleases created by a workflow do not trigger the `on: release` deploy workflow.Intermediate`Error: HttpError: Resource not accessible by integration` when uploading SARIF to code scanning.Intermediate