G
GitHub CLI
Details
Authentication
GitHub CLI stored login/session oauth2 discovered
$ gh auth login Acquired by the CLI — running gh auth login opens the auth flow and stores the credential.
env GH_TOKEN Create a personal access token from your GitHub account settings using Managing your personal access tokens. Choose scopes or fine-grained permissions based on the API or MCP actions you need. GitHub's docs note that fine-grained PATs include read access to public repositories, while classic PATs need scopes such as public_repo for public-repo access.