gh-auth
Authenticate with a GitHub host. tldr-pages
On several platforms
Several platforms
Log in with interactive prompt
gh auth loginIdentifyLog in with a token from stdin (created in <https://github.com/settings/tokens>)
echo your_token | gh auth login --with-tokenIdentifyCheck if you are logged in
gh auth statusIdentifyLog out
gh auth logoutIdentifyLog in with a specific GitHub Enterprise Server
gh auth login --hostname github.example.comIdentifyRefresh the session to ensure authentication credentials have the correct minimum scopes (removes additional scopes requested previously)
gh auth refreshIdentifyExpand the permission scopes
gh auth refresh --scopes repo,admin:repo_hook,admin:org,admin:public_key,admin:org_hook,...Identify