From 6f33fd673a9f0c9e03302fb71b818b3f357bf7be Mon Sep 17 00:00:00 2001 From: namdh Date: Sun, 13 Sep 2026 18:41:07 +0700 Subject: [PATCH] Update .gitlab-ci.yml --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 84db383..09ca1db 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -43,7 +43,8 @@ deploy: before_script: - command -v ssh-agent >/dev/null 2>&1 || (apt-get update -y && apt-get install -y openssh-client) - eval "$(ssh-agent -s)" - - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - + - chmod 600 "$SSH_PRIVATE_KEY" + - ssh-add "$SSH_PRIVATE_KEY" - mkdir -p ~/.ssh && chmod 700 ~/.ssh - ssh-keyscan -p "$DEPLOY_SSH_PORT" -H "$DEPLOYER_HOST" >> ~/.ssh/known_hosts 2>/dev/null - chmod 644 ~/.ssh/known_hosts