Github
This guide outlines the steps to generate a Personal Access Token (PAT) on GitHub
You can choose between a Classic Personal Access Token (PAT) for broad access or a Fine-Grained PAT for more precise, secure, and customizable permissions. Both authenticate with GitHub, but Fine-Grained PATs offer greater control.
Classic Personal Access Token
Steps to Generate a Classic PAT
- Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic).
- Click Generate new token.
- Provide a descriptive name in the Note field.
- Select No Expiration under Expiration.
- Choose the required Scopes:
reporead:orgread:useruser:email
- Click Generate token.
- Copy and securely store the token (it will be shown only once).
Fine-Grained Personal Access Token
Steps to Generate a Fine-Grained PAT
- Go to GitHub Settings → Developer settings → Personal access tokens → Fine-Grained Tokens.
- Click Generate new token.
- Enter a token name.
- Select No expiration under Expiration.
- Choose the Resource owner:
- If selecting an organization, ensure approval if required.
- Under Repository access, select All repositories.
- Assign Permissions:
- For an organization:
- Members (read), Administration (read), Repository Administration (read)
- Issues (write), Pull Requests (write)
- For a repository:
- Issues (write), Pull Requests (write), Email addresses (read)
- For an organization:
- Click Generate token and copy it immediately.
Your token is now ready for authentication with GitHub.
