Re: [RFC/PATCH] connect: add GIT_SSH_{SEND,RECEIVE}{,_COMMAND} env variables
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 4, 2018, 19:06 UTC
- Message-ID
- <xmqq608hfnpp.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20180104044230.GA12113@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 12 quoted lines
> I get that you may have two different keys to go with two different > identities on a remote system. But I'm not sure I understand why > "sending" or "receiving" is the right way to split those up. Wouldn't > you also sometimes want to fetch from repository X? IOW, wouldn't you > want to tie identity "A" to repository "X", and "B" to repository "Y? > >> So now I just have a GIT_SSH_COMMAND that dispatches to different keys >> depending on the operation, as noted in the commit message, and I can >> assure you that without that logic it doesn't work. > > You mentioned host aliases later, which is the solution I've seen in the > wild. And then you can map each remote to a different host alias.
Yup, I do agree that it is exactly the established solution for this kind of situation.