GH-AUTH(1)
β¨ GH-AUTH(1) β¨
okay so this is the gh-auth page from the GitHub CLI manual β literally the whole vibe of "how do I prove to GitHub that I'm me" π«Ά bestie, you're gonna be so authenticated by the end of this.
πΈ NAME πΈ
gh-auth β Authenticate gh and git with GitHub π
like, that's the whole job. get gh and git talking to GitHub as you. no cap.
π¦ SYNOPSIS π¦
gh auth <command> [flags]
it's giving "go pick a subcommand" energy. the <command> is the main character here, and [flags] is whatever extra little garnish you wanna sprinkle on top β¨
π AVAILABLE COMMANDS π
okay here's the roster, the whole lineup, and yes i'm listing every single one because we don't skip π
gh-auth-login(1)β Log in to a GitHub account π like, the classic. you, GitHub, a token, a whole moment.gh-auth-logout(1)β Log out of a GitHub account π breaking up (respectfully).gh-auth-refresh(1)β Refresh stored authentication credentials π your creds said "glow-up time".gh-auth-setup-git(1)β Setup git with GitHub CLI π οΈ makinggitand GitHub actually cooperate, iconic behavior.gh-auth-status(1)β Display active account and authentication state on each known GitHub host π the vibe check. who are you right now, and where?gh-auth-switch(1)β Switch active GitHub account π main character swap. multiple accounts is valid.gh-auth-token(1)β Print the authentication token gh uses for a hostname and account ποΈ yes it literally just prints the token, handle with care bestie.
π EXIT CODES π
when the command finishes it tells you how it went, and here's the full legend:
0: Successful execution β slay, it worked.1: Error π something went wrong.2: Command canceled π you (or something) hit stop.4: Authentication required π it needs you to log in first, bestie. it's giving locked door.
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information. π so like, don't @ me if a subcommand has its own extra codes β go read its help. iykyk.
π SEE ALSO π
gh(1)β the whole parent CLI, the mothership π
and that's the page!! π§π
little sign-off moment: this is GitHub CLI v2.102.0, dated Oct 2026 β so if your version is older, go update, no cap πβ¨π
π¦ where this page comes from
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms