gh(1)Sep(2020)

Auto generated by spf13/cobra

NAME

gh-auth-login - Authenticate with a GitHub host

SYNOPSIS

gh auth login [flags]

DESCRIPTION

Authenticate with a GitHub host.

This interactive command initializes your authentication state either by helping you log into GitHub via browser-based OAuth or by accepting a Personal Access Token.

The interactivity can be avoided by specifying --with-token and passing a token on STDIN.

OPTIONS

-h, --hostname=""
    The hostname of the GitHub instance to authenticate with

--with-token[=false]
    Read token from standard input

OPTIONS INHERITED FROM PARENT COMMANDS

--help[=false]
    Show help for command

EXAMPLE

    $ gh auth login
    # => do an interactive setup
    $ gh auth login --with-token < mytoken.txt
    # => read token from mytoken.txt and authenticate against github.com
    $ gh auth login --hostname enterprise.internal --with-token < mytoken.txt
    # => read token from mytoken.txt and authenticate against a GitHub Enterprise Server instance

SEE ALSO

gh-auth(1)

HISTORY

8-Sep-2020 Auto generated by spf13/cobra