I configured a gitlab runner as explained here: https://docs.gitlab.com/runner/install/windows.html
Unfortunately, when I push to my repository, my pipeline fails:
Installing Git on C:\Git instead of c:\Program Files... fixed this problem for me.
My runner was installed on an Amazon EC2 instance, and I installed git after I installed the runner. I found restarting the entire EC2 instance fixed it. Restarting the service was not enough.
For me it happened that I installed git after I started PowerShell to run gitlab-runner. To fix this you need to restart PowerShell after git is installed and then restart gitlab-runner to get git on your PATH.
I solved the problem myself: my .gitlab-ci.yml
script was redefining the PATH
environment variable.