diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 35ddb11d5aca1bf3a1d1b1dd8915c08b8cb85bf5..583621618cffa090876431a660f32337270efe5a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -15,6 +15,7 @@ docker_centos_build:
     - DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata
     - apt-get -y install cmake wget git g++ gfortran
     - mkdir -p /root/openfpm_dependencies/openfpm_pdata/base
+    - mkdir /root/.ssh && chmod 700 /root/.ssh
     - 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 -H git.mpi-cbg.de >> ~/.ssh/known_hosts