Created
February 27, 2017 14:57
-
-
Save lpetre/178f7c57ee1453bf0ce0d449e8e217a7 to your computer and use it in GitHub Desktop.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment