Issue
Trying to setup a GIT repository on the SCM section for a job, the following error appears on the GUI:
Failed to connect to repository : Could not init /your/path/to/a/filetmp
In certain situations, the job is executed properly even with this issue.
Resolution
Follow these steps:
1) Check if Git is installed on the Jenkins server. If so, find path to the Git executable by:
-
Unix System:
which git
. -
Windows System:
where git
.
2) Check if the Git Executable Path is properly set under
(for CJP 1.x it is under ).-
Unix System, example:
/usr/bin/git
. -
Windows System example
C:/Program Files (x86)/Git/bin/git.exe
. Do not forget to include '.exe' extensionMake sure not to include any white space at the end of your path.
This article is part of our Knowledge Base and is provided for guidance-based purposes only. The solutions or workarounds described here are not officially supported by CloudBees and may not be applicable in all environments. Use at your own discretion, and test changes in a safe environment before applying them to production systems.