-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Windows 7
With the current version of the Git plugin, the code assumes to find SSH executable in a specific directory. By default this installation directory for Git on Windows is "C:\ProgramFiles\Git\bin\ssh.exe" (32-bit) or "C:\ProgramFiles (x86)\Git\bin\ssh.exe" (64-bit). I am referring to this method in the plugin's source code:
If the Git client was installed into a custom directory, it's impossible to configure known SSH credentials. The plugin will show an error message. I understand that you want to ensure that the Git installation should be the official Git client. However in our environment we require that each Job must be able to specify specific versions of all tools so we must be able to support side by side installs of different versions Git.
Would it be possible to extend the plugin to either determine the GIT & SSH executables in the PATH or allow the plugin to point to a custom GIT & SSH executable?
Could you further clarify your use model?
The code as implemented in git-client-plugin 1.6.2 first checks for git in the default location, then if it is not found there, it will check for an ssh in the same directory as the git executable.
I think that algorithm would support your use model so long as you never install git in the default location. Choosing to never install git in the default location will further support your requirement that every job must explicitly declare its dependencies on the tools it uses.
Is your use case that you want git available in the default location, and you want git in non-default locations, and you want the git executable to be selected first from the path, rather than the current technique which selects ssh first from the default git location, then failing that it selects ssh from the same directory that has the git binary?
Or, is the root problem that the current code is not evaluating the PATH to find the executable?