Could not set the value of environment variable 'GITLAB_USER_NAME'

Summary

For GitLab user with name which contains non-ASCII characters, GitLab CI runner fails with the following error message:

FAILURE: Build failed with an exception.

* What went wrong:
Could not set the value of environment variable 'GITLAB_USER_NAME': could not convert string to current locale

This bug affects GitLab Enterprise Edition 10.0.2-ee (gitlab-ee@f5b3271dc8d316c801d3804086e91373d07e1bc9). It seems it was introduced in this version, because this started happening after updating to this version.

Steps to reproduce

  • Log in with an account which contains non-ASCII characters in username
  • Run build

What is the current bug behavior?

CI runner crashes.

What is the expected correct behavior?

CI runner should make a build and execute all the tests.

Edited by Mirko Jurić-Kavelj