From 9d0481928c84f5605864e80d1fbc26ad1d22ec5b Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Tue, 12 Feb 2019 17:16:59 +0100 Subject: [PATCH] 16. fix use ssh in ci script --- .gitlab-ci.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1fef941..330c774 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -51,6 +51,17 @@ job3: variables: GIT_SUBMODULE_STRATEGY: recursive + before_script: + - echo "Prepare ssh environment" + - eval $(ssh-agent -s) + - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - + - mkdir -p ~/.ssh + - chmod 700 ~/.ssh + - ssh-keyscan gitlab.com >> ~/.ssh/known_hosts + - chmod 644 ~/.ssh/known_hosts + - ssh git@gitlab.com + - echo "Preparing ssh environment done" + - whoami script: - whoami