gpt4 book ai didi

gitlab-ci - gitlab-runner : prepare environment failed to start process pwsh in windows

转载 作者:行者123 更新时间:2023-12-04 11:17:59 29 4
gpt4 key购买 nike

在新的 WIN10 机器上安装带有 shell 执行器(即 powershell)的 gitlab-runner 并启动 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

最佳答案

发现pwsh shell 的条目gitlab-runner config.toml 中的属性在某些 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

关于gitlab-ci - gitlab-runner : prepare environment failed to start process pwsh in windows,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68050125/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com