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.