Re: [PATCH 0/3] Add support for per-remote and per-namespace SSH options
- From
Wesley <wesleys@opperschaap.net>
- Date
- Mar 28, 2026, 01:02 UTC
- Message-ID
- <8c6cb953-e4b5-40c2-9fc3-734ffee7f313@opperschaap.net>
- In-Reply-To
- <acb_SQ8gdy-fQaFj@fruit.crustytoothpaste.net>
On 3/27/26 18:06, brian m. carlson wrote:
Show 21 quoted lines
> On 2026-03-27 at 16:49:35, Wesley wrote: >> On 3/27/26 12:10, Junio C Hamano wrote: >> >>> I somehow thought that this practice is so widespread that it was >>> one of the few first things any new people learn to do, but perhaps >>> we do not have a good documentation coverage? >> >> As said before it is weird thing to configure a global ssh configuration >> just for git transport. It doesn't make much sense. >> >> The problem with ssh_config usage is that you need to change your ssh >> config, which is machine global, not just git. And not portable across teams >> with configurations committed to git. Myrepos is a good example of this. My >> former employer had this and I know the Perl metacpan project also uses >> mysrepos. Changing every URL dynamically in committed configs isn't really a >> nice ask. > > You can also use the conditional inclusion functionality to rewrite URLs > for repositories in a certain directory with `url.<URL>.insteadOf`. Or > you can use conditional inclusion to use `core.sshCommand` with the `-i` > option set appropriately.
That is what I did and why I thought a simple addition in git would make it declarative in git via its configuration. This would limit the scripting side for just adding "this identityFile should be used in this repo" or "this remote". Including allowing setting sshOpts for specific remotes and/or repos.
Cheers, Wesley
-- Wesley Why not both?