From: Junio C Hamano <gitster@pobox.com>
To: Johannes Sixt <j6t@kdbg.org>
Cc: Wesley Schwengle <wesleys@opperschaap.net>, git@vger.kernel.org
Subject: Re: [PATCH 0/3] Add support for per-remote and per-namespace SSH options
Date: Fri, 27 Mar 2026 09:10:33 -0700 [thread overview]
Message-ID: <xmqqbjg9mex2.fsf@gitster.g> (raw)
In-Reply-To: <7d3731c5-d766-47f5-af60-813b379cbeef@kdbg.org> (Johannes Sixt's message of "Fri, 27 Mar 2026 08:51:32 +0100")
Johannes Sixt <j6t@kdbg.org> writes:
> Am 27.03.26 um 00:37 schrieb Wesley Schwengle:
>> * `remote.*.sshIdentityFile' and `remote.*.sshOpts'
>>
>> Configuration set on owner/path style. This is to support `includeIf`
>> configuration management. For example, a git-forge that host both
>> employer/client repo's. Eg, `git@gitlab.com/waterkip/git.git' and
>> `git@gitlab.com/corp/git.git' would have something configured as:
>>
>> * `core.sshIdentityFile.*', eg
>>
>> [core "sshIdentityFile"]
>> waterkip = ~/.ssh/id_ed25519_me
>> corp = ~/.ssh/id_ed25519_corporate
>
> This can be solved without a changing Git today. You configure the two
> remotes with different fake host names:
>
> [remote "waterkip"]
> url = git@waterkip.gitlab/waterkip/git.git
> [remote "corp"]
> url = git@corp.gitlab/corp/git.git
> And set up the real host name and identity file in ~/.ssh/config:
>
> Host waterkip.gitlab
> IdentityFile ~/.ssh/id_ed25519_me
> HostName gitlab.com
>
> Host corp.gitlab
> IdentityFile ~/.ssh/id_ed25519_corporate
> HostName gitlab.com
>
>
> For this reason, I see little incentive to add complexity to Git that
> achieves the same.
Very well said.
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?
In any case, I do not think these network/transport specific
configuration would hardly belong to "core".
next prev parent reply other threads:[~2026-03-27 16:10 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-26 23:37 [PATCH 0/3] Add support for per-remote and per-namespace SSH options Wesley Schwengle
2026-03-26 23:37 ` [PATCH 1/3] connect: Rename name to command in connect_git() Wesley Schwengle
2026-03-27 21:33 ` Jeff King
2026-03-28 0:58 ` Wesley
2026-03-28 1:44 ` Jeff King
2026-03-28 2:01 ` Wesley
2026-03-26 23:37 ` [PATCH 2/3] connect: Add transport->remote->name to git_connect() Wesley Schwengle
2026-03-27 21:39 ` Jeff King
2026-03-26 23:37 ` [PATCH 3/3] connect: Add support for per-remote and per-namespace SSH options Wesley Schwengle
2026-03-27 21:45 ` Jeff King
2026-03-28 0:43 ` Wesley
2026-03-28 2:03 ` Jeff King
2026-03-28 2:25 ` Wesley
2026-03-27 7:51 ` [PATCH 0/3] " Johannes Sixt
2026-03-27 15:04 ` Wesley
2026-03-27 16:10 ` Junio C Hamano [this message]
2026-03-27 16:49 ` Wesley
2026-03-27 22:06 ` brian m. carlson
2026-03-28 1:02 ` Wesley
2026-03-28 7:46 ` Johannes Sixt
2026-03-27 21:51 ` brian m. carlson
2026-03-27 22:25 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqbjg9mex2.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=j6t@kdbg.org \
--cc=wesleys@opperschaap.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox