Loading .gitlab-ci.yml +7 −1 Original line number Original line Diff line number Diff line Loading @@ -24,7 +24,13 @@ build:lektor: - mkdir -p ~/.ssh - mkdir -p ~/.ssh - chmod 700 ~/.ssh - chmod 700 ~/.ssh - eval $(ssh-agent -s) - eval $(ssh-agent -s) - echo "${DEPLOY_KEY}" | tr -d '\r' | ssh-add - > /dev/null # # See https://gitlab.com/gitlab-org/gitlab-ce/issues/14434 # To avoid issues with the newlines and the encoding, the variable # should contain the base64 encoding of the private key as follows: # $ cat deploy_key | base64 -w0 # - ssh-add <(echo "${DEPLOY_KEY}" | base64 -d) - ssh-keyscan -p ${DEPLOY_PORT} "${DEPLOY_HOST}" >> ~/.ssh/known_hosts - ssh-keyscan -p ${DEPLOY_PORT} "${DEPLOY_HOST}" >> ~/.ssh/known_hosts - chmod 644 ~/.ssh/known_hosts - chmod 644 ~/.ssh/known_hosts only: only: Loading Loading
.gitlab-ci.yml +7 −1 Original line number Original line Diff line number Diff line Loading @@ -24,7 +24,13 @@ build:lektor: - mkdir -p ~/.ssh - mkdir -p ~/.ssh - chmod 700 ~/.ssh - chmod 700 ~/.ssh - eval $(ssh-agent -s) - eval $(ssh-agent -s) - echo "${DEPLOY_KEY}" | tr -d '\r' | ssh-add - > /dev/null # # See https://gitlab.com/gitlab-org/gitlab-ce/issues/14434 # To avoid issues with the newlines and the encoding, the variable # should contain the base64 encoding of the private key as follows: # $ cat deploy_key | base64 -w0 # - ssh-add <(echo "${DEPLOY_KEY}" | base64 -d) - ssh-keyscan -p ${DEPLOY_PORT} "${DEPLOY_HOST}" >> ~/.ssh/known_hosts - ssh-keyscan -p ${DEPLOY_PORT} "${DEPLOY_HOST}" >> ~/.ssh/known_hosts - chmod 644 ~/.ssh/known_hosts - chmod 644 ~/.ssh/known_hosts only: only: Loading