File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed
src/main/java/org/jenkinsci/plugins/gitclient Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -2626,6 +2626,15 @@ public File getSSHExecutable() {
26262626 return sshexe ;
26272627 }
26282628
2629+ // Check for ssh.exe on the system PATH (supports Microsoft OpenSSH and other alternate implementations)
2630+ String sshPath = getPathToExe ("ssh" );
2631+ if (sshPath != null ) {
2632+ sshexe = new File (sshPath );
2633+ if (sshexe .exists ()) {
2634+ return sshexe ;
2635+ }
2636+ }
2637+
26292638 // Check Program Files
26302639 sshexe = getFileFromEnv ("ProgramFiles" , "\\ Git\\ bin\\ ssh.exe" );
26312640 if (sshexe != null && sshexe .exists ()) {
@@ -2685,16 +2694,6 @@ public File getSSHExecutable() {
26852694 }
26862695 }
26872696
2688- // Check for ssh.exe on the system PATH as last resort (supports Microsoft OpenSSH and other alternate
2689- // implementations)
2690- String sshPath = getPathToExe ("ssh" );
2691- if (sshPath != null ) {
2692- sshexe = new File (sshPath );
2693- if (sshexe .exists ()) {
2694- return sshexe ;
2695- }
2696- }
2697-
26982697 throw new RuntimeException (
26992698 "ssh executable not found. The git plugin only supports official git client https://git-scm.com/download/win" );
27002699 }
You can’t perform that action at this time.
0 commit comments