cli/pkg
Tyler McGoffin ccb830ca36 Shorten language on Authenticate with a GitHub host.
The default authentication mode is a web-based browser flow. After completion, an
authentication token will be stored securely in the system credential store.
If a credential store is not found or there is an issue using it gh will fallback
to writing the token to a plain text file. See `gh auth status` for its
stored location.

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

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: ${{ github.token }}` to `env`.

The git protocol to use for git operations on this host can be set with `--git-protocol`,
or during the interactive prompting. Although login is for a single account on a host, setting
the git protocol will take effect for all users on the host.

Specifying `ssh` for the git protocol will detect existing SSH keys to upload,
prompting to create and upload a new key if one is not found. This can be skipped with
`--skip-ssh-key` flag.

USAGE
  gh auth login [flags]

FLAGS
  -p, --git-protocol string   The protocol to use for git operations on this host: {ssh|https}
  -h, --hostname string       The hostname of the GitHub instance to authenticate with
      --insecure-storage      Save authentication credentials in plain text instead of credential store
  -s, --scopes strings        Additional authentication scopes to request
      --skip-ssh-key          Skip generate/upload SSH key prompt
  -w, --web                   Open a browser to authenticate
      --with-token            Read token from standard input

INHERITED FLAGS
  --help   Show help for command

EXAMPLES
  # 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

LEARN MORE
  Use `gh <command> <subcommand> --help` for more information about a command.
  Read the manual at https://cli.github.com/manual
  Learn about exit codes using `gh help exit-codes` around Tylers-GitHub-MacBook.local
2024-09-20 15:51:07 -07:00
..
cmd Shorten language on Authenticate with a GitHub host. 2024-09-20 15:51:07 -07:00
cmdutil Fix repo fork to use remote protocol if none configured 2024-05-10 10:48:36 +02:00
extensions gh extension install not give an error if extension already installed and a clear message (#8211) 2023-10-19 15:22:21 +02:00
findsh go fmt 2021-12-02 16:12:24 +01:00
githubtemplate Add issue create --editor 2024-07-09 21:01:50 +09:00
httpmock Remove Internal from gh repo create prompt when owner is not an org (#9465) 2024-08-22 10:01:16 -07:00
iostreams Add headers to all tables (#8157) 2023-10-20 11:20:02 +02:00
jsoncolor Wrap JSON arrays, objects in array with --slurp 2024-04-04 01:26:05 -07:00
jsonfieldstest Add tests for JSON field support on issue and pr view commands 2024-07-12 17:35:54 +02:00
markdown chore: fix some function names 2024-09-02 15:18:42 +08:00
option Add further docs to Option type 2024-05-10 11:05:59 +02:00
search Add json export flags to variable list command (#8516) 2024-01-17 10:09:09 -08:00
set Add GH_HOST to hosts list if it has corresponding auth token (#5087) 2022-01-29 07:37:24 +00:00
ssh Even better config support 2022-07-22 11:03:14 -05:00
surveyext Unify use of tab indent in non-test source files 2024-08-03 00:35:30 +08:00