GitHub CLI | Take GitHub to the command line

PHOTO EMBED

Tue Jul 08 2025 12:01:45 GMT+0000 (Coordinated Universal Time)

Saved by @Shookthadev999

# Start interactive setup
$ gh auth login

# Authenticate against <github.com> by reading the token from a file
$ gh auth login --with-token < mytoken.txt

# Authenticate with specific host
$ gh auth login --hostname enterprise.internal
content_copyCOPY

https://cli.github.com/manual/gh_auth_login