2

currently working on a proof of concept with automation, so i am trying to get Jenkins working with our GIT repo, but after filling in the credentials i am getting a weird error.

Failed to connect to repository : Could not init C:\apache-tomcat-8.0.20\temp\hudson426153378954858779tmp

this happens at the config screen of the project in jenkins at the git selection

ignoring this error gives me this log from trying to get the repo:

Started by user anonymous
Building in workspace C:\Users\<name>\.jenkins\workspace\test-build
Cloning the remote Git repository
Cloning repository https://gitlab.<project name>.git
 > C:\Program Files (x86)\Git\libexec\git-core\git.exe init C:\Users\<name>\.jenkins\workspace\test-build # timeout=10
ERROR: Error cloning remote repo 'origin'
ERROR: Error cloning remote repo 'origin'
Finished: FAILURE
  • the git repo is private
  • Running on Apache tomcat 8.0.20
  • Jenkins Version 1.602.war
  • Windows 7 pro x64
R.Stevens
  • 115
  • 2
  • 12
  • 1
    Seen [this](http://stackoverflow.com/questions/26933107/error-in-jenkins-connection-to-stash) and [this](https://groups.google.com/forum/#!topic/jenkinsci-users/i2MzOZmSjxM)? Basically, try a) fixing path to git executable b) removing the temp folder c) updating/downgrading git plugin d) using egit integration. You should fix the config screen problem first, git integration won't work before. – eis Mar 10 '15 at 09:05
  • Are you using ssh? if you do try first to clone it with ssh to see if this its a permission issue – CodeWizard Mar 10 '15 at 11:57
  • Downgrading the git plugin seemed to do the trick. – R.Stevens Mar 10 '15 at 15:14

2 Answers2

0

the best thing is to use JGIT rather using git and downgrading git plugin, It worked for me.enter image description here

TEDDY
  • 821
  • 10
  • 24
0

Sounds like the current git plugin may have issues. As a more general comment, I have found that running something like

git ls-remote -h https://gitlab.<project name>.git HEAD

by hand (on the command line on the Jenkins server) is a useful step in debugging the connection (and getting the two sides past any manual prompts that are needed).

Dan
  • 358
  • 1
  • 11