File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
src/main/java/org/jenkinsci/plugins/gitclient Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -2641,15 +2641,6 @@ public File getSSHExecutable() {
26412641 return sshexe ;
26422642 }
26432643
2644- // Check for ssh.exe on the system PATH (supports Microsoft OpenSSH and other alternate implementations)
2645- String sshPath = getPathToExe ("ssh" );
2646- if (sshPath != null ) {
2647- sshexe = new File (sshPath );
2648- if (sshexe .exists ()) {
2649- return sshexe ;
2650- }
2651- }
2652-
26532644 // Check Program Files
26542645 sshexe = getFileFromEnv ("ProgramFiles" , "\\ Git\\ bin\\ ssh.exe" );
26552646 if (sshexe != null && sshexe .exists ()) {
@@ -2709,6 +2700,15 @@ public File getSSHExecutable() {
27092700 }
27102701 }
27112702
2703+ // Check for ssh.exe on the system PATH as last resort (supports Microsoft OpenSSH and other alternate implementations)
2704+ String sshPath = getPathToExe ("ssh" );
2705+ if (sshPath != null ) {
2706+ sshexe = new File (sshPath );
2707+ if (sshexe .exists ()) {
2708+ return sshexe ;
2709+ }
2710+ }
2711+
27122712 throw new RuntimeException (
27132713 "ssh executable not found. The git plugin only supports official git client https://git-scm.com/download/win" );
27142714 }
You can’t perform that action at this time.
0 commit comments