diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0a17ac6dbb1e1ddfa852ef78b588a4c103cba66b..49a411b6421c8a1d99dbe71568431ad813ea18da 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -9,7 +9,7 @@ verify:
   services:
     - name: registry.gitlab.com/gitlab-org/build/cng/gitaly:latest
       # Disable the hooks so we don't have to stub the GitLab API
-      command: ["bash", "-c", "mkdir /home/git/repositories && rm -rf /srv/gitlab-shell/hooks/* && exec /scripts/process-wrapper"]
+      command: ["bash", "-c", "mkdir -p /home/git/repositories && rm -rf /srv/gitlab-shell/hooks/* && exec /scripts/process-wrapper"]
       alias: gitaly
   variables:
     GITALY_ADDRESS: "tcp://gitaly:8075"