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