IT:AD:GitHub:HowTo:Setup a PAT
Summary
- PATs are required for remote services (eg: Azure) to act on your behalf in your repo.
- It's massively buried in the GitHub portal's interface and unintuitively located.
- Go to github.com
- Choose your User (not Repo!) Settings. On the top right.
- On the far bottom left, you'll see
Developer Settings - There are two types of PATs that you can create.
- Fine Grained ones -
- Classic ones.
- For the deployment of Azure Static Web Apps, you currently (Q2/2024) need a classic.
- Select
Generate a New Token- Give it a name (eg:
GT_<reponame>eg:GT_BASE_CLIENT_THEMED) - Set an expiration date. 3months min in my case.
- Set to a specific Repo (eg:
BASE_CLIENT_THEMED) - Scopes/Permissions:
- For SWA, you need the following
scopes:repo(all),workflow(all),write:packages