gpt4 book ai didi

GitLab CI 构建失败,无法识别 git

转载 作者:太空狗 更新时间:2023-10-29 14:17:08 24 4
gpt4 key购买 nike

我已经设置了一个 GitLab 管道,并配置了一个运行器。当我提交时构建开始,但几乎立即失败并显示以下消息:

C:\GitLabRunner\builds\xxxxxxxx\0\cmac\portal>"git" "checkout" "-f" "-q" 
"xxxxxxxxxxxxxxxxxxxxxxxxx"

'"git"' is not recognized as an internal or external command,
operable program or batch file.

C:\GitLabRunner>IF 9009 NEQ 0 exit /b 9009
ERROR: Job failed: exit status 9009

这是我的 .gitlab-ci.yml,我已将其剥离以尝试隔离问题:

stages:
- build
variables:
CI_DEBUG_TRACE: "true"
Build:
stage: build
script:
- Echo OK

我能找到的唯一类似问题是 herehere

当我在标准命令提示符下尝试使用 git 时收到相同的消息时,我认为我已经解决了这个问题,因为我的 PATH 没有在环境变量中正确设置。

但是我现在已经修复了这个问题,并且我通过命令提示符从 git 得到了预期的响应,但是当 gitlab 开始构建时我仍然遇到这个问题。

有什么想法吗?

最佳答案

在构建机器上安装新应用程序后,重启 gitlab runner 以获取路径。

关于GitLab CI 构建失败,无法识别 git,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46102032/

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