开发者

Unable to get Jenkins and Git to play nice

开发者 https://www.devze.com 2023-04-04 12:42 出处:网络
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

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?


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号