Commit a0a8064d authored by Pietro Saccardi's avatar Pietro Saccardi

Reading environment var base64-encoded

parent e07459b7
Pipeline #513 failed with stages
in 6 minutes and 51 seconds
...@@ -24,7 +24,13 @@ build:lektor: ...@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment