diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e27efc89541d00bff59667c1f84a76fcf81fa5f4..35ddb11d5aca1bf3a1d1b1dd8915c08b8cb85bf5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -17,7 +17,7 @@ docker_centos_build:
     - mkdir -p /root/openfpm_dependencies/openfpm_pdata/base
     - cp id_rsa.pub /root/.ssh/id_rsa.pub && chmod 644 /root/.ssh/id_rsa.pub
     - cp id_rsa /root/.ssh/id_rsa && chmod 600 /root/.ssh/id_rsa
-    - ssh-keyscan git.mpi-cbg.de
+    - ssh-keyscan -H git.mpi-cbg.de >> ~/.ssh/known_hosts
     - ./build.sh $CI_PROJECT_DIR unused pdata 0 base
   cache:
     key: $CI_COMMIT_REF_SLUG