Group Runner stuck with 'Created fresh repository.'

Hi Everybody,

Initialized empty git repository seems wrong, because there is an git repositories which the runners should operate on (see pipline output below).

Could give me anyone an hint what I do wrong here?

I have two Gitlab-CI runners on two Windows LTSC VMs.

  • One is running as expected (Shared runner)
  • The other (Group Runner) stucks with “Initialized empty Git repository in C:/GitlabRunner/builds/fqYELQzP/0/
    Except the runner type (Shared vs. Gruop) I can’t figure out the difference.

We run the service as user account as described in [1]

Also please note that I have to prepare steps that include privileged security for our sys-admin, since I don’t have them…

Here is what the pipline says:

Initialized empty Git repository in C:/GitlabRunner/builds/fqYELQzP/0/group/project/.git/
[12](https://git.company.com/group/project/-/jobs/30672#L12)hint: Using 'master' as the name for the initial branch. This default branch name
[13](https://git.company.com/group/project/-/jobs/30672#L13)hint: is subject to change. To configure the initial branch name to use in all
[14](https://git.company.com/group/project/-/jobs/30672#L14)hint: of your new repositories, which will suppress this warning, call:
[15](https://git.company.com/group/project/-/jobs/30672#L15)hint:
[16](https://git.company.com/group/project/-/jobs/30672#L16)hint: git config --global init.defaultBranch <name>
[17](https://git.company.com/group/project/-/jobs/30672#L17)hint:
[18](https://git.company.com/group/project/-/jobs/30672#L18)hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
[19](https://git.company.com/group/project/-/jobs/30672#L19)hint: 'development'. The just-created branch can be renamed via this command:
[20](https://git.company.com/group/project/-/jobs/30672#L20)hint:
[21](https://git.company.com/group/project/-/jobs/30672#L21)hint: git branch -m <name>
Created fresh repository.
DEBUG:  286+  >>>> & "git" "-c" "http.userAgent=gitlab-runner 13.8.0 windows/amd64" "fetch" 
"origin" "+refs/pipelines/6207:refs/pipelines/6207" 
"+refs/heads/453-visual-studio-codium-with-gcc:refs/remotes/origin/453-visual-studio-codium-with-gc
c" "--depth" "10" "--no-tags"

Reading this, I tried to set the defaultBranch with an before_script (see below in gitlab-ci.yaml).

As you can see I also set log_level = debug, but
eventws.msc seems not to show any useful in this case:

Level	Date and Time	Source	Event ID	Task Category
Information	2/10/2021 12:01:59 PM	gitlab-runner	1	None	Checking for jobs... received                     e[0;m  jobe[0;m=30668 repo_urle[0;m=https://git.company.com/group/project.git runnere[0;m=fqYELQzP
Information	2/10/2021 11:56:10 AM	gitlab-runner	1	None	[session_server].listen_address not defined, session endpoints disablede[0;m  buildse[0;m=0
Information	2/10/2021 11:56:10 AM	gitlab-runner	1	None	listen_address not defined, metrics & debug endpoints disablede[0;m  buildse[0;m=0
Information	2/10/2021 11:56:10 AM	gitlab-runner	1	None	Configuration loaded                              e[0;m  buildse[0;m=0
Information	2/10/2021 11:56:10 AM	gitlab-runner	1	None	Starting multi-runner from C:\GitlabRunner\config.toml...e[0;m  buildse[0;m=0

gitlab-runner.toml:

concurrent = 2
check_interval = 0
log_level = "debug"
log_format = "text"

[session_server]
  session_timeout = 1800

[[runners]]
  name = "Computername"
  url = "https://git.company.com/"
  token = "TOKEN"
  executor = "shell"
  shell = "powershell"
  environment = ["PATH=PATH;C:/git/bin;C:/cmake/bin;C:/MinGW/bin"]
  [runners.custom_build_dir]
  [runners.cache]
    [runners.cache.s3]
    [runners.cache.gcs]
    [runners.cache.azure]


.\gitlab-runner.exe --version
Version:      13.8.0
Git revision: 775dd39d
Git branch:   13-8-stable
GO version:   go1.13.8
Built:        2021-01-20T13:32:55+0000

Gitlab (Self-Hosted Community) Version: 13.8.3

gitlab-ci.yml (excerpt):
stages:
- compile

before_script:
     - git config --global init.defaultBranch develop

compile64.debug.mingw:
    stage: compile
    tags:
        - windows
        - debug
        - mingw
    variables:
        #GIT_DEPTH: 10
        #GIT_STRATEGY: fetch
        #GIT_FETCH_EXTRA_FLAGS: --no-tags
        #GIT_SUBMODULE_STRATEGY: recursive
        build_path: .\build\debug_x64-gnu830
        src_path: ..\..\src
    script:
        - git submodule sync
        - git submodule update --init --recursive
        - mkdir -Force $build_path
        - cd $build_path
        - cmake -DCMAKE_BUILD_TYPE=Debug $src_path
        - make

compile64.release.mingw:
    stage: compile
    tags:
        - windows
        - release
        - mingw
    variables:
        GIT_DEPTH: 10
        GIT_STRATEGY: fetch
        GIT_FETCH_EXTRA_FLAGS: --no-tags
        GIT_SUBMODULE_STRATEGY: recursive
        build_path: .\build\release_x64-gnu830
        src_path: ..\..\src\
    script:
        - mkdir -Force $build_path
        - cd $build_path
        - cmake -DCMAKE_BUILD_TYPE=Release $src_path
        - make    

For testing (we use this VM for other stuff too) git is not in the system path, that’s why it’a appended in the runner config (see above).

[1] Install GitLab Runner on Windows | GitLab