1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-22 10:42:07 +02:00
tldr/pages/common/gh-auth.md
bl-ue 8ebd171d6f
*: fix typos reported by Hunspell (#5848)
Co-authored-by: marchersimon <50295997+marchersimon@users.noreply.github.com>
Co-authored-by: Seth Falco <seth@falco.fun>
Co-authored-by: Patrice Denis <patricedenis@users.noreply.github.com>
2021-05-20 16:13:41 -04:00

759 B

gh auth

Authenticate with a GitHub host from the command-line. More information: https://cli.github.com/manual/gh_auth.

  • Log in with interactive prompt:

gh auth login

echo {{your_token}} | gh auth login --with-token

  • Check if you are logged in:

gh auth status

  • Log out:

gh auth logout

  • Log in with a specific GitHub Enterprise Server:

gh auth login --hostname {{github.example.com}}

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

gh auth refresh

  • Expand the permission scopes:

gh auth refresh --scopes {{write:org,read:public_key}}