Git命令行工具未安装Windows

时间:2015-06-22 15:59:57

标签: git cordova jenkins

我使用VM作为cordova打包器的构建机器,它从git中提取cordova插件以添加到应用程序中。我在vm上安装了git并将其添加到路径中。

当它尝试从git添加插件时,我在jenkins控制台中收到错误:

Error: "git" command line tool is not installed: make sure it is accessible on your PATH.

我不知道还能做些什么来帮助jenkins找到git文件,我可以远程访问vm并从命令行运行git命令。

3 个答案:

答案 0 :(得分:0)

您必须在Jenkins服务器上声明Git安装(在Master的全局配置中,或在slave配置上):

enter image description here

(我的例子是针对Linux的,但它与Windows的原理相同)

请确认它解决了您的问题:)

答案 1 :(得分:0)

您是否曾尝试将其关闭再打开?

抱歉,但是,实际上,请关闭控制台并再次打开它,以便更新路径。这可能有所帮助。

答案 2 :(得分:0)

Managed to work out what the issue was. Whoever set up the jenkins slave in the first place created the PATH in the config page, so the PATH it was using had nothing to do with the path on the actual build machine, and changing that had no effect on where it looked for the git installation.