Tweak gh auth login examples
This commit is contained in:
parent
cc2b86f3a6
commit
49909b5123
1 changed files with 4 additions and 4 deletions
|
|
@ -52,14 +52,14 @@ func NewCmdLogin(f *cmdutil.Factory, runF func(*LoginOptions) error) *cobra.Comm
|
|||
The minimum required scopes for the token are: "repo", "read:org".
|
||||
`, "`"),
|
||||
Example: heredoc.Doc(`
|
||||
# start interactive setup
|
||||
$ gh auth login
|
||||
# => do an interactive setup
|
||||
|
||||
# authenticate against github.com by reading the token from a file
|
||||
$ 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
|
||||
# authenticate with a specific GitHub Enterprise Server instance
|
||||
$ gh auth login --hostname enterprise.internal
|
||||
`),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
if !opts.IO.CanPrompt() && !(tokenStdin || opts.Web) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue