詹金斯选取错误的git二进制

问题描述 投票:1回答:1

我有一个詹金斯服务器(版本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的配置:

  • 节点(Windows)中的Git下Tool Locations提到:

enter image description here

  • 服务器(Linux)的混帐下Global Tool Configuration提到:

enter image description here

git jenkins server jenkins-plugins
1个回答
0
投票

您需要配置在管理詹金斯的Git工具 - >管理节点 - > YOUR_NODE_NAME - >配置页面。在Node Properties部分中,您必须启用Tool Locations然后添加的Git工具的位置(需要指定Home为您的节点上安装GIT)。

© www.soinside.com 2019 - 2024. All rights reserved.