diff --git a/Jenkinsfile b/Jenkinsfile index 08e1c7a..81c5238 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,8 +14,9 @@ pipeline { stages { stage('Checkout') { steps { - sshagent(credentials: ['gitea-ssh']) { + withCredentials([sshUserPrivateKey(credentialsId: 'gitea-ssh', keyFileVariable: 'GIT_KEYFILE')]) { sh ''' + export GIT_SSH_COMMAND="ssh -i $GIT_KEYFILE -o StrictHostKeyChecking=accept-new" if [ -d .git ]; then git remote set-url origin ssh://git@git.mandelblog.com:2222/salt/mandelstudio.git git fetch --tags --force --progress origin