Interview Prep/GitHub Actions/Permissions, Tokens & Secrets

`Error: Input required and not supplied: token` on a fork PR.

BeginnerTroubleshootingPermissions, Tokens & Secrets
Answer

Likely causes → The step passes token: ${{ secrets.SOME_PAT }}, which is empty for forks.

Diagnose → Check whether the run is from a fork.

Fix → Skip the step for forks (if: github.event.pull_request.head.repo.full_name == github.repository) or use github.token where read access is enough.

Prevent → Design PR workflows to work without secrets.

All GitHub Actions questions Roadmap: GitHub Actions

More on Permissions, Tokens & Secrets