我按照此处的说明配置了 gitlab 运行程序:https ://docs.gitlab.com/runner/install/windows.html
不幸的是,当我推送到我的存储库时,我的管道失败了:
Running with gitlab-runner 10.5.0 (80b03db9)
on windows runner 79cb4019
Using Shell executor...
Running on WINSTD-45-13...
'"git"' is not recognized as an internal or external command,
operable program or batch file.
'"git"' is not recognized as an internal or external command,
operable program or batch file.
Cloning repository...
'"git"' is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the path specified.
Checking out b05fd8be as master...
'"git"' is not recognized as an internal or external command,
operable program or batch file.
ERROR: Job failed: exit status 9009
Run Code Online (Sandbox Code Playgroud)
当我以管理员身份打开命令行实用程序时,git可用。
知道为什么git在管道脚本中无法识别吗?
我自己解决了这个问题:我的.gitlab-ci.yml脚本正在重新定义PATH环境变量。
小智 6
对我来说,碰巧我在启动 PowerShell 来运行 gitlab-runner 后安装了 git。要解决此问题,您需要在安装 git 后重新启动 PowerShell,然后重新启动 gitlab-runner 以将 git 添加到您的 PATH 中。
| 归档时间: |
|
| 查看次数: |
4745 次 |
| 最近记录: |