我有一个运行在Oracle Linux 2.150.2
上的Jenkins服务器(版本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
尝试升级所有插件,然后重新启动Jenkins无效。
以某种方式,Jenkins 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
...
我的Jenkins Git配置:
Tool Locations
下提到的Global Tool Configuration
下提到的