Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gitlab runner configuration on windows

i am trying to use gitlab runner installed on my windows machine . But pipeline execution fails with error: ERROR: Job failed (system failure): prepare environment: failed to start process: exec: "pwsh": executable file not found in %PATH%. Check https://docs.gitlab.com/runner/shells/index.html#shell-profile-loading for more information

I am using "shell" as executor while registering runner. I have also setup path variables correctly.

I have setup path varialbes correctly in system variable

like image 874
ketan Avatar asked Oct 27 '25 06:10

ketan


1 Answers

In the root directory of your gitlab runner installation, often c:\gitlab-runner you'll see a config.toml file. You need to change pwsh (powershell core) to powershell (powershell).

[[runners]]
  executor = "shell"
  shell = "pwsh"

to

[[runners]]
  executor = "shell"
  shell = "powershell"

See also:

  • Gitlab where is config.toml
like image 123
Charles Owen Avatar answered Oct 29 '25 07:10

Charles Owen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!