Update .gitlab-ci.yml
This commit is contained in:
+2
-1
@@ -43,7 +43,8 @@ deploy:
|
|||||||
before_script:
|
before_script:
|
||||||
- command -v ssh-agent >/dev/null 2>&1 || (apt-get update -y && apt-get install -y openssh-client)
|
- command -v ssh-agent >/dev/null 2>&1 || (apt-get update -y && apt-get install -y openssh-client)
|
||||||
- eval "$(ssh-agent -s)"
|
- 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
|
- mkdir -p ~/.ssh && chmod 700 ~/.ssh
|
||||||
- ssh-keyscan -p "$DEPLOY_SSH_PORT" -H "$DEPLOYER_HOST" >> ~/.ssh/known_hosts 2>/dev/null
|
- ssh-keyscan -p "$DEPLOY_SSH_PORT" -H "$DEPLOYER_HOST" >> ~/.ssh/known_hosts 2>/dev/null
|
||||||
- chmod 644 ~/.ssh/known_hosts
|
- chmod 644 ~/.ssh/known_hosts
|
||||||
|
|||||||
Reference in New Issue
Block a user