CmdID

CmdID / Commands

gh-auth

Authenticate with a GitHub host. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

Log in with interactive prompt

gh auth loginIdentify

Log in with a token from stdin (created in <https://github.com/settings/tokens>)

echo your_token | gh auth login --with-tokenIdentify

Check if you are logged in

gh auth statusIdentify

Log out

gh auth logoutIdentify

Log in with a specific GitHub Enterprise Server

gh auth login --hostname github.example.comIdentify

Refresh the session to ensure authentication credentials have the correct minimum scopes (removes additional scopes requested previously)

gh auth refreshIdentify

Expand the permission scopes

gh auth refresh --scopes repo,admin:repo_hook,admin:org,admin:public_key,admin:org_hook,...Identify