From 771d84e548bd22cb1c9ecce724e6b03f5bc09698 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Tue, 11 Apr 2017 20:56:30 +0200 Subject: [PATCH] BUGFIX: Allow ssh agent to work on alpine * Use a file instead of bash expansion. --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9141aac..0ff57a6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,7 +16,9 @@ sync:github: - apk add --no-cache openssh-client git # SSH deploy key - eval $(ssh-agent -s) - - ssh-add <(echo "${SSH_PRIVATE_KEY}") + - echo "$SSH_PRIVATE_KEY" > /tmp/private_key + - chmod go-rwx /tmp/private_key; chmod u-x /tmp/private_key + - ssh-add /tmp/private_key - mkdir -p ~/.ssh - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' script: