Runner for Windows fails to clone when commit message is a single non-ASCII character

Summary

Runner for Windows fails to clone git repos on Windows OS with non-English locales when the commit message is a single character.

Steps to reproduce

Create your Windows runner:

  1. Create and connect remotely to a Windows OS EC2 server
  2. Install GitLab runner for Windows
  3. Go to Settings > Time & Language > Add a language
  4. Select and install a language such as Korean or Japanese
  5. Configure the system locale in powershell. Ex: Set-WinSystemLocale ko-KR
  6. Reboot server

On GitLab:

  1. Create a new commit with a project that has a .gitlab-ci.yml file
  2. Enter the commit message test and commit. This works
  3. Enter the commit message and commit. This fails
  4. Enter the commit message ああ and commit. This works
  5. Enter the commit message and commit. This fails
  6. Enter the commit message 한한 and commit. This works

Example Project

https://gitlab.com/mbadeau/450946

Workaround

Set the Windows system locale to en-US.

In Powershell, run Set-WinSystemLocale en-US and then reboot.

Possible fixes

Edited by Matthew Badeau