Hacker News new | ask | show | jobs
by hrpnk 119 days ago
The host shenanigans are simpler addressed with `git config core.sshCommand` which overrides the default key and selects the desired one on a per repository level.

source: https://erik.doernenburg.com/2017/12/using-multiple-github-a...

1 comments

Doesn’t work for cloning, obviously. The way I handle it is I have ssh look at the hostname and path passed by git and decide which identity to use. This is very easy in openssh 10.0+ using the command matching syntax, and more difficult to varying degrees on earlier versions of openssh, depending on your OS.