我正在尝试使用安装在我的 Windows 机器上的 gitlab runner 。但管道执行失败并出现错误: 错误:作业失败(系统故障):准备环境:无法启动进程:exec:“pwsh”:在%PATH%中找不到可执行文件。检查 https://docs.gitlab.com/runner/shells/index.html#shell-profile-loading 了解更多信息
我在注册跑步者时使用“shell”作为执行器。 我还正确设置了路径变量。
我在系统变量中正确设置了路径变量
在 gitlab runner 安装的根目录中,通常
c:\gitlab-runner
你会看到一个 config.toml 文件。您需要将pwsh(powershell core)更改为powershell(powershell)。
[[runners]]
executor = "shell"
shell = "pwsh"
到
[[runners]]
executor = "shell"
shell = "powershell"
另请参阅: