GitHub Personal Access Token โ Setup Checklist
Your pipeline needs a token to read and write your repo automatically. Fine-grained PATs split permissions into separate scopes โ get the wrong ones and your Action fails with a permissions error that looks nothing like "you're missing a scope." Set it up right, once, now.
Steps
Not the "classic" token type โ use fine-grained, so you can scope it tightly to just your team's repo.
Don't grant access to all repos. One token, one repo.
90 days comfortably covers the trimester. Note the date somewhere your team can see it โ an expired token mid-sprint looks identical to a broken pipeline.
| Scope | Access level | What it's for |
|---|---|---|
Contents | Read and write | Committing pipeline output, reading data files |
Actions | Read and write | Triggering / re-running workflow runs |
Workflows | Read and write | Editing files under .github/workflows/ |
Secrets | Read and write | Only if your automation manages repo secrets itself โ most teams won't need this one |
Repo โ Settings โ Secrets and variables โ Actions โ New repository secret. Reference it in your workflow as ${{ secrets.YOUR_SECRET_NAME }}.
A simple Action that commits a one-line timestamp file is enough to confirm the token actually has the access you think it has.
Contents but not Workflows access will let your pipeline commit data fine, but any change to the workflow file itself gets silently rejected. If your Action runs but a workflow-file edit doesn't take effect, this is almost always why.