New windows Server 2019 runner fails with lock file error

:hugs: Please help fill in this template with all the details to help others help you more efficiently. Use formatting blocks for code, config, logs and ensure to remove sensitive data.

Problem to solve

This is a new runner on windows server 2019. I am able to write a pipeline to get things like the version of JQ from it but I cannot do other tasks. My main goal is to use it to build a windows docker container.

It’s using the “shell” executor and “pwsh” shell

error: could not lock config file C:\Program Files\Gitlab-Runner\builds\runnername\gitlabrepo\gitlabrunner.tmp\git-template\config: No such file or directory

Steps to reproduce

I’ve opened up permission to Everyone, I’ve moved the build dir, I’ve run the service as System and a local user that can be admin. No change.


  - build
  - test

  stage: build

    - test
    - windows
    - echo "Starting build stage..."
    - New-Item -Path "C:\\builds\\example" -ItemType "directory"
    - New-Item -Path "C:\\builds\\example\\file.txt" -ItemType "file"
    - Add-Content -Path "C:\\builds\\example\\file.txt" -Value "Hello Jerry"
    - echo "File created and text added."
    - echo "Build stage complete."


runner version 17, was using 16.8 and no change
Gitlab is self hosted version 16.8

  • [X ] Self-managed
  • SaaS
  • [ X] Self-hosted Runners

Helpful resources

I’ve looked.