From d252a766b49085919984c1218898444c7f5bd1eb Mon Sep 17 00:00:00 2001 From: Ariejan de Vroom Date: Fri, 31 Aug 2018 16:22:37 +0200 Subject: [PATCH] update ssh key config --- .gitlab-ci.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 815fd83..9eb5076 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,11 +21,10 @@ test: pages: before_script: # Setup SSH keys - - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' - - eval $(ssh-agent -s) - - ssh-add <(echo "$SSH_PRIVATE_KEY") - - mkdir -p ~/.ssh - - '[[ -f /.dockerenv ]] && echo "$SSH_SERVER_HOSTKEYS" > ~/.ssh/known_hosts' + - mkdir -p ~/.ssh # Setup SSH + - echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_rsa + - chmod 600 ~/.ssh/id_rsa + - ssh-keyscan -H 'mail.devroom.io' >> ~/.ssh/known_hosts script: # Compile