Runner: "fatal: empty ident name not allowed" occurring randomly

I use Gitlab Runners on some projects. After working for a while, the build starts failing with this error:

git reset --hard origin/%TARGET_BRANCH%

HEAD is now at da07d08 Update .gitlab-ci.yml

$ git merge --ff origin/%CI_BUILD_REF_NAME%

*** Please tell me who you are.

Run

git config --global user.email "you@example.com" git config --global user.name "Your Name"

to set your account's default identity. Omit --global to set the identity only in this repository.

fatal: empty ident name (for <Syst�me@JENKINS.(none)>) not allowed ERROR: Build failed: exit status 128

The user and email are correctly configured globally (as all my projects share the same user) but not locally. If on a particular project I configure the user and mail locally, the build passes. I think there are several problems but I don't know if they are related to Gitlab:

  • Why a passing build suddenly fails with no modification on the config ?
  • Why is the global config not used, forcing me to configure the local one in each project ?

I don't know where to look but I will gladly help debug this issue