gh-auth(1)

gh-auth1

Authenticate gh and git with github

Usage

gh auth <command> [flags]

Available commands

gh-auth-login(1)

Log in to a GitHub account

gh-auth-logout(1)

Log out of a GitHub account

gh-auth-refresh(1)

Refresh stored authentication credentials

gh-auth-setup-git(1)

Setup git with GitHub CLI

gh-auth-status(1)

Display active account and authentication state on each known GitHub host

gh-auth-switch(1)

Switch active GitHub account

gh-auth-token(1)

Print the authentication token gh uses for a hostname and account

Exit status

0: Successful execution

1: Error

2: Command canceled

4: Authentication required

NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.

Releases

3 releases since Debian 12 (Bookworm); the text changed 2 times.

  1. 12
  2. 13
  3. Arch

From github-cli 2.102.1-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.