Difference between revisions of "Gh auth login"

From wikieduonline
Jump to navigation Jump to search
(Created page with " == See also == * {{gh repo}} * {{gh}} Category:GitHub")
 
 
(28 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{lowercase}}
 +
[[gh auth]] login <ref>https://cli.github.com/manual/gh_auth_login</ref>
 +
[[gh auth status]]
 +
[[gh auth login --help]]
  
 +
== Examples ==
 +
{{gh auth login TOKEN}}
  
 +
 +
 +
? What account do you want to log into?  [Use arrows to move, type to filter]
 +
> GitHub.com
 +
  [[GitHub Enterprise Server]]
 +
 +
> HTTPS
 +
  SSH
 +
 +
! First copy your one-time code: 8A0V-XXYY
 +
- Press Enter to open github.com in your browser...
 +
✓ Authentication complete. Press Enter to continue...
 +
 +
- [[gh config set]] -h github.com git_protocol ssh
 +
✓ Configured git protocol
 +
HTTP 422: Validation Failed (https://api.github.com/user/keys)
 +
key is already in use
 +
 +
== Related ==
 +
* <code>[[gh repo list]] your_organization_name</code>
 +
* <code>[[gh repo list --private]]</code>
 +
* <code>[[gh auth refresh]]</code>
 +
* <code>[[gh issue list]]</code>
 +
* <code>[[glab auth login]]</code>
 +
* <code>[[brew install gh]], [[apt install gh]]</code>
 +
* [[PAT]]
 +
* [[~/.config/gh/hosts.yml]]
 +
* [[remote: Support for password authentication was removed on August 13, 2021.]]
 +
* [[fatal: repository 'https://github.com/XXXXXX/' not found]]
  
 
== See also ==
 
== See also ==
 
* {{gh repo}}
 
* {{gh repo}}
 +
* {{gh auth}}
 
* {{gh}}
 
* {{gh}}
  
 
[[Category:GitHub]]
 
[[Category:GitHub]]

Latest revision as of 14:04, 22 October 2024

gh auth login [1]
gh auth status
gh auth login --help

Examples[edit]

 ? What account do you want to log into? GitHub Enterprise Server
? GHE hostname: github.youthostname.com
? What is your preferred protocol for Git operations? HTTPS
? Authenticate Git with your GitHub credentials? Yes
? How would you like to authenticate GitHub CLI? Paste an authentication token
Tip: you can generate a Personal Access Token here https://github.yourname.com/settings/tokens
The minimum required scopes are 'repo', 'read:org', 'workflow' (GHE 3.0+).
? Paste your authentication token: ***********************
- gh config set -h github.yourname git_protocol https
✓ Configured git protocol
✓ Logged in as youruser


? What account do you want to log into?  [Use arrows to move, type to filter]
> GitHub.com
  GitHub Enterprise Server

> HTTPS
  SSH

! First copy your one-time code: 8A0V-XXYY
- Press Enter to open github.com in your browser...
✓ Authentication complete. Press Enter to continue...

- gh config set -h github.com git_protocol ssh
✓ Configured git protocol
HTTP 422: Validation Failed (https://api.github.com/user/keys)
key is already in use

Related[edit]

See also[edit]

  • https://cli.github.com/manual/gh_auth_login
  • Advertising: