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
Solution
Solution 1: Open a CMD or powershell window and install the newer pwsh.exe:
winget install Microsoft.PowerShell
Solution 2: Edit your config.toml to use the older powershell.exe:
From
[[runners]]
name = "ci-runner"
url = "http://xxx.yyy.xx/"
token = "XXXXX"
executor = "shell"
shell = "pwsh"
To
[[runners]]
name = "ci-runner"
url = "http://xxx.yyy.xx/"
token = "XXXXX"
executor = "shell"
shell = "powershell"
And then restarting gitlab-runner fixed the issue.
gitlab-runner.exe restart
Latest posts by rajeshkumar (see all)
- How to get Blackduck Trial version? - December 3, 2023
- PHP ionCube Error: cannot be decoded by this version of the ionCube Loader - December 2, 2023
- Cloudbees CD/RO Error: ectool - November 24, 2023