GH-AUTH-LOGOUT(1)
π gh-auth-logout(1) β the GitHub CLI manual, bestie edition π
okay so this is a page from the GitHub CLI manual, and it's literally all about logging out of a GitHub account. no cap, it's shorter than it sounds. let's get into it π«Ά
β¨ NAME β¨
gh-auth-logout β log out of a GitHub account π
πΈ SYNOPSIS πΈ
gh auth logout [flags]
π¦ DESCRIPTION π¦
so basically: remove authentication for a GitHub account. that's the vibe.
this command removes the stored authentication configuration for an account. and here's the important bit, bestie β the authentication configuration is only removed locally. like, on your machine. that's it.
β οΈ okay this part matters SO much: this command does not revoke authentication tokens. it's giving "cleaning your room by shoving everything in the closet." the tokens are still out there, living their life π
if you actually want to revoke all authentication tokens generated by the GitHub CLI, here's the whole ritual:
- visit β¨https://github.com/settings/applicationsβ©
- select the
"GitHub CLI"application - select
"Revoke Access" - select
"I understand, revoke access"
π note: this procedure will revoke all authentication tokens ever generated by the GitHub CLI across all your devices. every single one. your phone, your laptop, your weird old desktop in the closet. all of them. so like, be sure fr fr.
for more information about revoking OAuth application tokens, see:
β¨https://docs.github.com/en/apps/oauth-apps/using-oauth-apps/reviewing-your-authorized-oauth-appsβ©
π OPTIONS π
-h,--hostname <string>β the hostname of the GitHub instance to log out of π-u,--user <string>β the account to log out of π€
β EXIT CODES β
0: successful execution β slay β¨1: error β not slay π2: command canceled β you changed your mind, iconic4: authentication required β you gotta prove who you are first π
π NOTE: specific commands may have additional exit codes. refer to the command's help for more information. iykyk.
π EXAMPLE π
# Select what host and account to log out of via a prompt
$ gh auth logout
# Log out of a specific host and specific account
$ gh auth logout --hostname enterprise.internal --user monalisa
like, the first one is the "let the prompt decide my fate" route, and the second one is the "i know exactly who and where" route. both valid. both ate π
π₯ SEE ALSO π₯
and that's the whole page, bestie!! π this lil beauty is from GitHub CLI v2.102.0, dated Oct 2026 β go forth and log out responsibly, mwah π§β¨
π¦ 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