Community
Participate
Working Groups
org.eclipse.jgit.transport.TransportGitSsh class has Putty installation detection for Windows OS: > boolean putty = ssh.toLowerCase(Locale.ROOT).contains("plink") Where ssh variable is: > String ssh = SystemReader.getInstance().getenv("GIT_SSH"); Unfortunately for me, I ought to override GIT_SSH to point to a shell script, which has "plink" as a substring of one of its containing directories: $HOME/??pLink**/bin/ssh_robot. As a result, TransportGitSsh assumes I am on Windows, with Putty SSH installation, and adds to an SSH command a "-batch" attribute which is not supported by Linux SSH installations. For now, I had to resort to renaming the project folder to something which doesn't have "plink" in the path. However, since putty binary is "plink.exe", I wonder if it would be acceptable make putty detection a little more robust for everybody, and look up the "plink" substring in the filename part only. I.e., given "$HOME/??pLink**/bin/ssh_robot" path, do the check on the "ssh_robot", rather than the full path. A simplistic, Linux-only fix is attached as a patch file. It is based off of 4.7 version, but is similar or identical on all releases starting with at least 3.0. If need be, I am willing to work on the proper patch, if there idea of the fix sounds OK.
Created attachment 274563 [details] Do putty detection only on the filename only