GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
GH-AUTH-LOGIN(1) GitHub CLI manual GH-AUTH-LOGIN(1)

gh-auth-login - Authenticate with a GitHub host

gh auth login [flags]

Authenticate with a GitHub host.

The default authentication mode is a web-based browser flow. After completion, an authentication token will be stored internally.

Alternatively, use --with-token to pass in a token on standard input. The minimum required scopes for the token are: "repo", "read:org".

Alternatively, gh will use the authentication token found in environment variables. This method is most suitable for "headless" use of gh such as in automation. See gh help environment for more info.

To use gh in GitHub Actions, add GH_TOKEN: ${{secrets.GITHUB_TOKEN}} to "env".

-p, --git-protocol <string>
The protocol to use for git operations: {ssh|https}

-h, --hostname <string>
The hostname of the GitHub instance to authenticate with

-s, --scopes <strings>
Additional authentication scopes to request

-w, --web
Open a browser to authenticate

--with-token
Read token from standard input

# 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 a specific GitHub instance
$ gh auth login --hostname enterprise.internal

gh-auth(1)
May 2022

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.