Git在Windows gitlab ci中无法识别 [英] Git is not recognized in Windows gitlab ci

查看:212
本文介绍了Git在Windows gitlab ci中无法识别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照这里的说明配置了一个gitlab运行器: https://docs.gitlab。 com / runner / install / windows.html

I configured a gitlab runner as explained here: https://docs.gitlab.com/runner/install/windows.html

不幸的是,当我推送到我的仓库时,我的管道失败了:

Unfortunately, when I push to my repository, my pipeline fails:

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

当我以管理员身份打开命令行实用程序, git 可用。

When I open the command line utility as administrator, git is available.

任何想法为什么 git 在流水线脚本中不被识别?

Any idea why git is not recognized whithin the pipeline script?

推荐答案

我自己解决了这个问题:my .gitlab-ci .yml 脚本重新定义了 PATH 环境变量。

I solved the problem myself: my .gitlab-ci.yml script was redefining the PATH environment variable.

这篇关于Git在Windows gitlab ci中无法识别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆