From 5235eb2aa414c09b646e177744eadfd2ab750fb9 Mon Sep 17 00:00:00 2001 From: Mandel Olaiya Date: Sun, 15 Mar 2026 02:01:01 +0100 Subject: [PATCH] Fix Jenkins checkout auth on external agents --- Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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