diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a843c1f50a54c92cc1a27a5c6c30e3b27e89a5db..b9449cee81dd57c1b18072c2ab8b004172ab088a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -110,7 +110,10 @@ stages:
     CI_ONIRO_BB_LOCAL_CONF_FETCHCMD_wget: "/usr/bin/env wget -L -t 6 -T 5 --no-check-certificate --passive-ftp"
   before_script:
     # Tell git this repository is safe even if cloned with a different uid
-    - git config --global --add safe.directory $CI_PROJECT_DIR
+    - |
+      git config --global --add safe.directory $CI_PROJECT_DIR
+      git config --global user.email "$GITLAB_USER_EMAIL"
+      git config --global user.name "$GITLAB_USER_NAME"
     # The repo tool seems to insist on having a branch checked out or
     # something like that... Without this we get errors like
     #     fatal: couldn't find remote ref refs/heads/master