GH-AUTH-LOGOUT(1) GitHub CLI manual GH-AUTH-LOGOUT(1)

gh-auth-logout - Log out of a GitHub account

gh auth logout [flags]

Remove authentication for a GitHub account.

This command removes the stored authentication configuration for an account. The authentication configuration is only removed locally.

This command does not invalidate authentication tokens.

The hostname of the GitHub instance to log out of
The account to log out of

# 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

gh-auth(1)

Apr 2024