3 ms·
You can configure SSH and Git to use separate keys if that's what you want (although for many people I'd recommend separating far more e.g. if you have work cre
by tialaramex 6y ago
You can configure SSH and Git to use separate keys if that's what you want (although for many people I'd recommend separating far more e.g. if you have work credentials and personal credentials, don't just segment GitHub, run everything on separate physical hardware, or at least a VM)
A mistake lots of people make in this case though is they don't set IdentitiesOnly (in OpenSSH). IdentitiesOnly tells SSH that even if it knows how to authenticate as, say, 'me', if you've told it to authenticate as 'employee' in a particular configuration it should insist on only authenticating as 'employee' never 'me'. If you don't do that you can get confusing behaviour (and of course a privacy hole) on GitHub if your SSH agent knows your 'me' credentials and you try to use an account set to 'employee' credentials, as it uses the wrong ones.
- Macha 6y agoAlso if you have a lot of keys set up and don't tell it to use a specific key, you can get login failures as the first 5 it tries aren't correct