gh-auth

Authenticate with a GitHub host from the command line.

TLDR

Login with interactive prompt

$ gh auth login
copy

Login with a token from standard input (created in https://github.com/settings/tokens)

$ echo [your_token] | gh auth login --with-token
copy

Check if you are logged in

$ gh auth status
copy

Log out

$ gh auth logout
copy

Login with a specific GitHub Enterprise Server

$ gh auth login --hostname [github.example.com]
copy

Copied to clipboard
free 100$ digital ocean credit