在新的WIN10机器上,在安装了带外壳执行器的gitlab-runner (即powershell)并启动CI构建之后,抛出了以下错误:
Preparing environment
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
发布于 2021-06-20 03:33:52
发现gitlab-runner config.toml中shell
属性的pwsh
条目在某些WIN10计算机上不起作用。所以我不得不像下面这样编辑confg.toml:
从…
[[runners]]
name = "ci-runner"
url = "http://xxx.yyy.xx/"
token = "XXXXX"
executor = "shell"
shell = "pwsh"
至
[[runners]]
name = "ci-runner"
url = "http://xxx.yyy.xx/"
token = "XXXXX"
executor = "shell"
shell = "powershell"
然后重启gitlab-runner解决了这个问题。
gitlab-runner.exe restart
https://stackoverflow.com/questions/68050125
复制相似问题