Last active
February 18, 2019 01:58
-
-
Save kelvinc1024/7782edac3df63e9d4f4236213fc70696 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
sh("mkdir ~/.ssh") | |
withCredentials([sshUserPrivateKey(credentialsId: '1234-abcd-efgh-5678', keyFileVariable: 'SSH_PRIVATE_KEY', passphraseVariable: 'SSH_PASS', usernameVariable: 'SSH_USER')]) { | |
sh("cp $SSH_PRIVATE_KEY ~/.ssh/id_rsa") | |
} | |
sh("chmod 700 ~/.ssh/id_rsa") | |
sh 'ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=~/.ssh/known_hosts -p 7999 git@bitbucket.org whoami' | |
sh 'git submodule update --init --recursive' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment