Re: Specifying a private key when connecting to a remote SSH repo

2013-09-12 Thread Junio C Hamano
Jeff King p...@peff.net writes: We already have GIT_SSH, so I would expect: GIT_SSH='ssh -i $HOME/.ssh/id_for_example_com' git push to work. But sadly, GIT_SSH does not use the shell, unlike most other configure git commands. :( You read me correctly ;-) We could consider it a

Re: Specifying a private key when connecting to a remote SSH repo

2013-09-12 Thread Breck Yunits
Thanks very much for the feedback and implementation suggestions. If the only thing you are interested in supporting is a one-shot invocation, i.e. giving which identity file to use from the command line when you run either git push or git fetch, Yes, this is the new option that could benefit

Specifying a private key when connecting to a remote SSH repo

2013-09-11 Thread Breck Yunits
It would be very helpful if you could specify the path to the private key to use for ssh remotes just like in ssh. ``` git push origin master -i 'path_to_key' ``` Althought there are workarounds involving ssh config, if you have a server that has hundreds of git repos, each with the own private

Re: Specifying a private key when connecting to a remote SSH repo

2013-09-11 Thread Junio C Hamano
Breck Yunits bre...@gmail.com writes: It would be very helpful if you could specify the path to the private key to use for ssh remotes just like in ssh. You could add a support for the remote.name.sshIdentityFile configuration variable, i.e. [remote origin] url =

Re: Specifying a private key when connecting to a remote SSH repo

2013-09-11 Thread Jeff King
On Wed, Sep 11, 2013 at 09:39:55PM -0700, Junio C Hamano wrote: If the only thing you are interested in supporting is a one-shot invocation, i.e. giving which identity file to use from the command line when you run either git push or git fetch, I suspect that you could play with GIT_SSH