Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to get Jenkins and Git to play nice

Tags:

git

jenkins

Jenkins version: 1.429
Git plugin version: 1.1.12

I am unable to get the Git plugin to clone a Git repository. It fails with the error

Command "git clone --progress -o vipor V:\VIPOR c:\Program Files\jenkins\workspace" returned status code 128: Cloning into
c:\Program Files\jenkins\workspace...
fatal: 'V:\VIPOR' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

The Git repo being cloned is on the local network. I have already tried the following

  • Read the Git plugin docs especially the part about the status code
  • Flipped the slashes to use UNIX-style paths
  • Accessed the source repository as a UNC path (instead of the mapped drive named V)
  • Forced Jenkins to use a path without spaces (editing the config.xml)
  • Ensured that the git executable is on the PATH
  • Forced the Windows Jenkins service to run not under a system account but as me

The last one I tried because I am successfully able to clone the repository in question by executing the very command being issued Git plugin, on the Jenkins server and with the same Git executable.

What am I missing?

like image 908
Sri Sankaran Avatar asked Sep 14 '11 02:09

Sri Sankaran


1 Answers

I believe the problem is this:

For a network path (such as V:) to be accessible/active, a user needs to be logged in. The Jenkins service does not actually log-in to a system, even if you run the service as you, and therefore network paths are usually not available by drive letter.

You might want to try the actual path to the repository, such as:

\\server\path\to\gitrepo

and see if that works.

like image 105
Sagar Avatar answered Sep 24 '22 05:09

Sagar