8000 How gh manage multiple ssh accounts? · cli cli · Discussion #9078 · GitHub
[go: up one dir, main page]

Skip to content
Discussion options

You must be logged in to vote

Well, when you do git clone git@github.com-me:<repo> presumably git is looking at your .ssh/config, finds:

Host github.com-me
  HostName github.com
  User git
  IdentityFile ~/.ssh/personal_key

And uses ~/.ssh/personal_key to authenticate.

When you do gh repo clone it's trying to clone git@github.com:<repo> which will not find the correct key.

If your question is "how does gh work with .ssh/config entries to use different keys for different repos on github.com" the answer is that it doesn't support it.

If your question is "how does gh support using multiple accounts on github.com" then https://github.com/cli/cli/blob/4b077daf7e74dbe6bf933f69e220066e3a12e8b4/docs/multiple-accounts.md is c…

Replies: 3 comments 7 replies

Comment options

You must be logged in to vote
6 replies
@yrodelo
Comment options

@williammartin
Comment options

Answer selected by yrodelo
@yrodelo
Comment options

@yrodelo
Comment options

@williammartin
Comment options

@yrodelo
Comment options

Comment options

You must be logged in to vote
1 reply
@williammartin
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
0