Interview Prep/GitHub Actions/Permissions, Tokens & Secrets

`actions/checkout` fails with `remote: Repository not found.` on a private repo after adding a job-level `permissions` block.

IntermediateTroubleshootingPermissions, Tokens & Secrets
Answer

Likely causes → The job block replaced the workflow block and did not include contents: read, so the token cannot read the repo.

Diagnose → "GITHUB_TOKEN Permissions" in the log shows Contents: none.

Fix → Add contents: read to the job's permissions.

Prevent → Remember job-level permissions replace, not merge.

All GitHub Actions questions Roadmap: GitHub Actions

More on Permissions, Tokens & Secrets