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.
- Jenkins LTS
- CloudBees Jenkins Enterprise
- Git Plugin
Follow these steps:
1) Check if Git is installed on the Jenkins server. If so, find path to the Git executable by:
- Unix System:
- Windows System:
2) Check if the Git Executable Path is properly set under Manage Jenkins > Global Tool Configuration > Git > Path to Git executable (for CJP 1.x it is under Manage Jenkins > Configure System > Git > Path to Git executable).
- Unix System, example:
- Windows System example
C:/Program Files (x86)/Git/bin/git.exe. Do not forget to include ‘.exe’ extension
Note: Make sure not to include any white space at the end of your path.