GH-AUTH-LOGIN(1) GitHub CLI manual GH-AUTH-LOGIN(1) (NAME) gh-auth-login - (SYNOPSIS) gh auth login [flags] (DESCRIPTION) . github.com . --hostname . . . gh . gh auth status . --with-token . (scopes) : repo read:org gist. (fine-grained) --with-token . GH_TOKEN . gh . (headless) gh . gh help environment . gh (GitHub Actions) GH_TOKEN: ${{ github.token }} env . --git-protocol . . ssh SSH . --skip-ssh-key . OAuth : . (OPTIONS) -c, --clipboard OAuth -p, --git-protocol : {ssh|https} -h, --hostname --insecure-storage -s, --scopes --skip-ssh-key SSH -w, --web --with-token (EXIT CODES) 0: 1: 2: 4: : . . (EXAMPLES) # $ gh auth login # OAuth $ gh auth login --web --clipboard # github.com $ gh auth login --with-token < mytoken.txt # $ gh auth login --hostname enterprise.internal (SEE ALSO) gh-auth(1) Sep 2026 GH-AUTH-LOGIN(1)