Sign in
GitHub CLI needs a logged-in account before it can clone private repos, open PRs, or file issues.
1. Start login
gh auth login
2. Answer the prompts
- GitHub.com
- HTTPS (simplest on school machines)
- Authenticate Login with a web browser
- Copy the one-time code, press Enter, and approve in the browser
SSH is fine if you already use SSH keys. HTTPS + browser is the path that works without extra key setup.
3. Confirm
gh auth status
You should see your GitHub username and Logged in to github.com.
If login fails
- Complete the browser step; do not close the tab early
- School machines sometimes block the redirect — try another browser or a personal device
- Account problems are Support, not a docs bug