|
|
|
|
|
by giaour
1682 days ago
|
|
GitHub does require that SSH keys only be used by a single user account. I shouldn’t have phrased my comment as a question: a former employer required that I use different GH accounts for different purposes, and it was a hassle to get local repositories to use the correct keypair. I recall being annoyed at GH at the time, but since your SSH key is used as an authentication mechanism on SSH pushes, they really can’t let a keypair be associated with multiple accounts. |
|
I agree. The way that I deal with this is as follows:
In my ~/.ssh/config I have content that looks like:
And then instead of I'd type Likewise, instead of I do and so on.With this way of doing it, the correct key pair gets used both for the initial clone and for subsequent pulls and pushes.
I suppose I could make a wrapper program that would take care of the substitution for me, to further reduce the amount of hassle. In fact I might end up doing that. I already have a few wrapper programs for various git commands.