7

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?

Sri Sankaran
  • 8,120
  • 4
  • 38
  • 47
  • @ThorbjomRavnAndersen Thanks for the tip. Yes, I have tried that too. I forgot to include that in the list of things I have already tried. I have updated the question. – Sri Sankaran Sep 14 '11 at 10:24

2 Answers2

8

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.

Sagar
  • 9,456
  • 6
  • 54
  • 96
  • 7
    But of course! Thank you so much. Hindsight is 20-20. Your tip got me going. I had to make a minor tweak to it, though. I had to use `//server/path/to/gitrepo`. With the backslash I got the error `\server\path\to\gitrepo does not appear to be a git repository`. Noting that error message mentioned only a **single** leading slash, I switching things and presto! – Sri Sankaran Sep 14 '11 at 14:57
  • @SriSankaran Did you use git plugin for jenkins or just type git commands in jenkins. I fill the repository URL as "//server/path/gitrepo" but it always says "does not appear to be a git repository". Do you know something about it? – Tinggo Apr 07 '13 at 09:54
  • @Tinggo I use the Git plugin. The answer to your issue may be one of not using the full path. See for example http://stackoverflow.com/questions/10391522/git-does-not-appear-to-be-a-git-repository. – Sri Sankaran Apr 07 '13 at 18:31
0

Shot in the dark: Have you tried double slashes? eg

V:\\VIPOR

We were on a similar path as yourself (jenkins and git on a windows box) and quickly found that we needed to move to linux. We got the impression that many of the plugins were not tested throughly (or at all) on windows.

Roy Truelove
  • 22,016
  • 18
  • 111
  • 153