From 8af2a3b50d189616531d6a6643f4607e9f129883 Mon Sep 17 00:00:00 2001 From: WinterMyst Date: Sun, 22 Sep 2024 16:05:15 +0200 Subject: [PATCH] fix: forgot to decode key --- .gitlab-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 093d5a1..32f4638 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,10 +36,11 @@ release: - gulp --version # Verify Gulp is installed # Set up SSH agent and add private key for pushing to protected branch - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' + - echo "$SSH_PRIVATE_KEY_ENCODED" | base64 --decode > ~/.ssh/id_rsa + - chmod 600 ~/.ssh/id_rsa - eval $(ssh-agent -s) - - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - + - ssh-add ~/.ssh/id_rsa - mkdir -p ~/.ssh - - chmod 700 ~/.ssh - ssh-keyscan gitlab.com >> ~/.ssh/known_hosts script: # Check if VERSION is provided