Windows Runner fails to clone branches with ' or in its name.
Currently, the GitLab Runner Helper image for Windows fails to clone a branch that contains a ' (single quote) in its name.
What happens is that the branch name gets sliced. For example, a branch named test's is interpreted as test, and the following error occurs:
Preparing the "shell" executor
Using Shell (powershell) executor...
Preparing environment
Running on COMPUTER...
Getting source from Git repository
Fetching changes with git depth set to 1...
Initialized empty Git repository in C:/Gitlab-Runner/builds/IE3tuK7Ck/0/pishel65/example/.git/
Created fresh repository.
fatal: couldn't find remote ref refs/heads/test
Cleaning up project directory and file based variables
ERROR: Job failed: exit status 128
As a result, the job fails immediately during the “Getting source from Git repository stage”.
Edited by Pishel65