- Install GitHub CLI
brew install gh - Log in
gh auth loginChoose GitHub.com, then HTTPS or SSH, then "Login with a web browser" and enter the code it shows.
Check it worked
- Check you're logged in
gh auth status
Undo it
- Log out and uninstall
gh auth logout && brew uninstall gh
- Install GitHub CLINeeds sudo
sudo apt install -y gh - Log in
gh auth loginChoose GitHub.com, then HTTPS or SSH, then "Login with a web browser" and enter the code it shows.
Check it worked
- Check you're logged in
gh auth status
Undo it
- Log out and uninstallNeeds sudo
gh auth logout && sudo apt remove -y gh
- Install GitHub CLI
winget install --id GitHub.cliClose and reopen PowerShell afterwards.
- Log in
gh auth loginChoose GitHub.com, then HTTPS or SSH, then "Login with a web browser" and enter the code it shows.
Check it worked
- Check you're logged in
gh auth status
Undo it
- Log out and uninstall
gh auth logout; winget uninstall --id GitHub.cli

New to GitHub? I explain it in plain English on Layman Terms.