我有一个詹金斯服务器(版本2.150.2
)在Oracle Linux的6.9
运行。 GIT中1.7.1
是(一旦运行/usr/bin/git
命令显示)安装在服务器和下which git
二进制可用。
我的Windows从连接到该主机和Git是这里配置为好。不过我收到以下错误:
Caused by: java.io.IOException: Cannot run program "/usr/bin/git" (in directory "C:\Jenkins\workspace\x\y\z"): CreateProcess error=2, The system cannot find the file specified
试图升级所有的插件并重新启动詹金斯无济于事。
不知何故,詹金斯的git插件拿起服务器git的路径,而不是节点。这从控制台日志是显而易见的:
...
15:17:07 Cloning the remote Git repository
15:17:08 Cloning repository xxx
15:17:09 > /usr/bin/git init C:\Jenkins\workspace\TestJobs\xxx\xxx # timeout=10
...
我詹金斯Git的配置:
Tool Locations
提到:Global Tool Configuration
提到:您需要配置在管理詹金斯的Git工具 - >管理节点 - > YOUR_NODE_NAME - >配置页面。在Node Properties
部分中,您必须启用Tool Locations
然后添加的Git工具的位置(需要指定Home
为您的节点上安装GIT)。