This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node { | |
withEnv(['PATH+GIT=C:\\Program Files\\Git\\usr\\bin\\']) { | |
echo env.PATH.split(/;/).join("\n") | |
if (fileExists('c:\\Program Files\\Git\\usr\\bin\\ssh-agent.exe')) { | |
echo 'Yes' | |
} else { | |
echo 'No' | |
} | |
sshagent (credentials: ['foo']) { | |
sh 'ssh -o StrictHostKeyChecking=no -l 1.2.3.4 uname -a' | |
} | |
} | |
} |
Author
lpetre
commented
Feb 27, 2017
[Pipeline] {
[Pipeline] withEnv
[Pipeline] {
[Pipeline] echo
C:\Program Files\Git\usr\bin\
...
[Pipeline] fileExists
[Pipeline] echo
Yes
[Pipeline] sshagent
[ssh-agent] Using credentials ec2-user (hns-test-ssh)
[ssh-agent] Looking for ssh-agent implementation...
Could not find ssh-agent: IOException: Cannot run program "ssh-agent": CreateProcess error=2, The system cannot find the file specified
Check if ssh-agent is installed and in PATH
[ssh-agent] FATAL: Could not find a suitable ssh-agent provider
[ssh-agent] Diagnostic report
[Pipeline] // sshagent
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] }
[Pipeline] // stage
[Pipeline] End of Pipeline
java.lang.RuntimeException: [ssh-agent] Could not find a suitable ssh-agent provider.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment