git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/3] Add support for per-remote and per-namespace SSH options

From
Johannes Sixt <j6t@kdbg.org>
Date
Mar 27, 2026, 07:51 UTC
Message-ID
<7d3731c5-d766-47f5-af60-813b379cbeef@kdbg.org>
In-Reply-To
<20260326233739.2911354-1-wesleys@opperschaap.net>
Am 27.03.26 um 00:37 schrieb Wesley Schwengle:
Show 12 quoted lines
> * `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.

-- Hannes
Previous: WesleyNext: Wesley
Message 14 of 24 in “Add support for per-remote and per-namespace SSH options”
  1. 0/3 Add support for per-remote and per-namespace SSH optionsWesley Schwengle, Mar 26, 2026
  2. 1/3 connect: Rename name to command in connect_git()Wesley Schwengle, Mar 26, 2026
  3. Jeff KingMar 27, 2026
  4. WesleyMar 28, 2026
  5. Jeff KingMar 28, 2026
  6. WesleyMar 28, 2026
  7. 2/3 connect: Add transport->remote->name to git_connect()Wesley Schwengle, Mar 26, 2026
  8. Jeff KingMar 27, 2026
  9. 3/3 connect: Add support for per-remote and per-namespace SSH optionsWesley Schwengle, Mar 26, 2026
  10. Jeff KingMar 27, 2026
  11. WesleyMar 28, 2026
  12. Jeff KingMar 28, 2026
  13. WesleyMar 28, 2026
  14. Johannes SixtMar 27, 2026
  15. WesleyMar 27, 2026
  16. Junio C HamanoMar 27, 2026
  17. WesleyMar 27, 2026
  18. brian m. carlsonMar 27, 2026
  19. WesleyMar 28, 2026
  20. Johannes SixtMar 28, 2026
  21. WesleyMar 28, 2026
  22. Ben KnobleMar 29, 2026
  23. brian m. carlsonMar 27, 2026
  24. Junio C HamanoMar 27, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.