GitHub CLI Setup
Configure gh CLI for GitHub access.
Check Current Status
gh auth status
Report one of these states:
ghis not authenticated and needs loginghis authenticated, including the current username if available
Login Flow
If authentication is missing or broken, guide the user through:
gh auth login
Select: GitHub.com -> HTTPS -> Login with browser
Verify Authentication
gh auth status
gh api user --jq '.login'
Troubleshooting
If gh commands fail:
- Check authentication -
gh auth status - Re-login if needed -
gh auth login - Check scopes - Ensure the token has repo access
- Refresh auth -
gh auth refresh - Update gh -
brew upgrade ghor equivalent