Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

troubles when using GIT_SSH along with multiple GIT applications #39

Closed
omniproc opened this issue Nov 4, 2012 · 3 comments
Closed

Comments

@omniproc
Copy link

omniproc commented Nov 4, 2012

Since msysgit is using the GIT_SSH environment variable to locate the ssh client which it should use, it seems impossible to define different ssh clients for different applications which use GIT.

I (and I suppose i'm not the only one while GIT grows in popularity) have a strong interest in choosing different ssh clients depending on the application which runs GIT. So far applications can not force such a behavior since besides GIT_SSH there seems no way to force GIT to use a specific SSH client at GIT-startup / runtime.

The Issue is: when running multiple applications which all use GIT but require to use a specific ssh client atleast one of them will fail to run.
It would be great, if there would be a attribute variable to start git with a specific ssh client instead of allways using the one specified in GIT_SSH.

@patthoyts
Copy link
Member

Your applications are running git in child processes and are therefore able to amend their environment before launching the git process. If the applications in question set GIT_SSH to something useful to them, then that will be seen by git and used when making ssh connections. You need to look into how to specify ssh client programs to these unnamed git-using applications and arrange to have those applications set GIT_SSH appropriately.

Alternatively, if these applications don't provide such mechanisms, you might consider a ssh script which attempts to examine its parent application and launches whichever ssh client is appropriate for the current process tree. Git provides a method for users or applications to specify alternative ssh clients -- it is setting up the GIT_SSH environment variable to point to the executable or script to be launched. All that is required is that people make use of it.

@omniproc
Copy link
Author

omniproc commented Nov 4, 2012

I've been looking for such methods with no luck. may you provide more specific informations about the methods git provides to specifiy the ssh client (user / api -styles?) or throw me a link where i can find those informations?

@kusma
Copy link
Member

kusma commented Nov 4, 2012

This is not a Windows specific issue; take it up on the main Git mailing list instead.

@kusma kusma closed this as completed Nov 4, 2012
dscho referenced this issue in dscho/git Mar 18, 2015
mingw: Define git-wrapper variables in the scope of the build targets
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants