From db687e1d1474df6b5681af2e19edf827f1bb7e89 Mon Sep 17 00:00:00 2001
From: Julian Rother <julian@cccv.de>
Date: Thu, 18 Jul 2024 00:14:49 +0200
Subject: [PATCH] Switch from deploy tokens to deploy keys due to expiry issues
 with tokens

---
 .gitlab-ci.yml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 407001d..0404689 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -16,7 +16,9 @@ autoupdate:
   dependencies: []
   needs: []
   script:
-  - git clone "https://${GITLAB_ACCESS_USER}:${GITLAB_ACCESS_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git" autoupdate-checkout
+  - mkdir -p ~/.ssh && chmod 0700 ~/.ssh && echo "$SSH_DEPLOY_KEY" > ~/.ssh/id_ed25519 && chmod 0600 ~/.ssh/id_ed25519
+  - echo "$SSH_HOST_KEY" > ~/.ssh/known_hosts
+  - git clone "git@${CI_SERVER_SHELL_SSH_HOST}:${CI_PROJECT_PATH}.git" autoupdate-checkout
   - |
     set -e 
     cd autoupdate-checkout
-- 
GitLab