From ceffbdd3c4eb712117a3512350e77e86c8649ec8 Mon Sep 17 00:00:00 2001
From: Daniel Gerhardt <daniel.gerhardt@mni.thm.de>
Date: Mon, 20 Jun 2016 13:53:51 +0200
Subject: [PATCH] Load SSH config from env

Builds no longer depend on a preexisting config in ~/.ssh.
---
 .gitlab-ci.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7af8c6238..bab2bec0b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -21,6 +21,8 @@ sync_mirror:
     - staging
   allow_failure: true
   script:
+    - mkdir ~/.ssh && echo "$GITHUB_HOST_KEY" > ~/.ssh/known_hosts
+    - eval $(ssh-agent -s) && ssh-add <(echo "$GITHUB_DEPLOY_KEY")
     - git clone --bare "$CI_BUILD_REPO" mirror.git
     - cd mirror.git
     - git update-ref -d refs/tags/production
-- 
GitLab