У меня есть сервер Jenkins (версия 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
Попытка обновления всех плагинов и перезапуска 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
...
Конфигурации My Jenkins Git:
- Узел (Windows) Git, упомянутый в
Tool Locations
:
![enter image description here](https://i.stack.imgur.com/4VWtN.png)
- Сервер (Linux) Git упоминается под
Global Tool Configuration
:
![enter image description here](https://i.stack.imgur.com/Y7OO8.png)