Error cloning remote repo 'origin'

3,586 views
Skip to first unread message

Thom Ellis

unread,
Feb 13, 2015, 6:01:19 PM2/13/15
to jenkins...@googlegroups.com
I'm brand new to Jenkins, and just trying to set up a simple test to try and play around with it a bit, but I'm hitting a snag, and not sure what the issue is.  I have a very basic git repository, and which I used to create a bare shared repository, and I'm just pointing directly to the repository itself in my configuration.  Whenver I run a build job however I get the following:

Started by user anonymous
Building in workspace /var/lib/jenkins/workspace/test-default
Cloning the remote Git repository
Cloning repository file:///home/repos/test.git
 > /usr/bin/git init /var/lib/jenkins/workspace/test-default # timeout=10
ERROR: Error cloning remote repo 'origin'
ERROR: Error cloning remote repo 'origin'
Finished: FAILURE

I'm able to clone the repo just fine from the command line, and I was also able to clone it just fine by creating a new build job where instead of linking to git, I just execute the clone command itself in Jenkins, with no issues.  Anyone have any tips/ideas?  With the limited error output, I'm not really sure what else to check.

Thanks in advance!

Mark Waite

unread,
Feb 14, 2015, 11:59:58 PM2/14/15
to jenkins...@googlegroups.com
I spent some time this weekend writing tests and evaluating possible code changes to ease diagnosis of git command line failures.

If you're willing to "test drive" an unreleased version of the git-client-plugin (which encapsulates the command line git calls used by the git-plugin), I'd like to use your case to evaluate the impact of the changes.

The unreleased version has passed its automated tests on multiple Windows versions, multiple Linux versions, and multiple git versions.

You can download and install that unreleased version of the plugin from:


Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/bcdd2e54-3afa-4f60-9881-8c8b83eac7b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Thanks!
Mark Waite

Thom Ellis

unread,
Feb 16, 2015, 8:32:27 PM2/16/15
to jenkins...@googlegroups.com
Thanks Mark.  I should have some time to play with this tomorrow, I'll let you know how I get along with it.

Cheers.

Thom Ellis

unread,
Feb 17, 2015, 1:05:27 PM2/17/15
to jenkins...@googlegroups.com
Hey Mark,

I was trying to play it safe, so I uninstalled the existing git-plugin, and then installed the version you pointed to on dropbox.  I can see it listed under installed plugins as version "1.16.2-SNAPSHOT (private 744b9fe-mwaite), however, git no longer shows up as an option (no radio button) under "Source Code Management" when configuring my job.  What did I do wrong here?

Thanks,
--thom


On Saturday, February 14, 2015 at 8:59:58 PM UTC-8, Mark Waite wrote:

Mark Waite

unread,
Feb 17, 2015, 1:16:36 PM2/17/15
to jenkins...@googlegroups.com
On Tue, Feb 17, 2015 at 11:05 AM, Thom Ellis <teh...@gmail.com> wrote:
Hey Mark,

I was trying to play it safe, so I uninstalled the existing git-plugin, and then installed the version you pointed to on dropbox.  I can see it listed under installed plugins as version "1.16.2-SNAPSHOT (private 744b9fe-mwaite), however, git no longer shows up as an option (no radio button) under "Source Code Management" when configuring my job.  What did I do wrong here?


You either uninstalled too much, or didn't install enough (depending on your perspective).  It would have been enough to install the prototype version of git-client-plugin, without an uninstall of any plugin.

Since you uninstalled the git plugin, you should install the git plugin (latest release, 2.3.4).  That should be enough to again show you the git plugin fields in the user interface, and should allow you to see the failure message from the call to "git init".

The git plugin and the git client plugin are separate plugins so that the git client API can be separated from the more detailed workflow and user interface components in the git plugin.

Thanks,
Mark Waite

 

For more options, visit https://groups.google.com/d/optout.



--
Thanks!
Mark Waite

Thom Ellis

unread,
Feb 17, 2015, 5:36:05 PM2/17/15
to jenkins...@googlegroups.com
Doh!  Sometimes I just move a little too quickly for my own good.

I've got it running now, and it seems to be accomplishing what was intended, in that it gives me some extra details:

Started by user anonymous
Building in workspace /var/lib/jenkins/workspace/test-default
Cloning the remote Git repository
Cloning repository file:///home/repos/test.git
 > /usr/bin/git init /var/lib/jenkins/workspace/test-default # timeout=10
 >> GitException message: Command "/usr/bin/git init /var/lib/jenkins/workspace/test-default" returned status code 129:
stdout: 
stderr: usage: git init [-q | --quiet] [--bare] [--template=<template-directory>] [--shared[=<permissions>]]

 >> stderr: usage: git init [-q | --quiet] [--bare] [--template=<template-directory>] [--shared[=<permissions>]]

ERROR: Error cloning remote repo 'origin'
ERROR: Error cloning remote repo 'origin'
Finished: FAILURE

I believe error 129 is returned anytime you specify improper parameters to a git command (?), which seems to explain why it's echo'ing out usage details here.  The issue I believe then is that the server I'm using is on an older version of git (1.6.0.2), and it appears at that time, "git init" didn't accept a directory in the command.  It looks like the plugin requires 1.7.9 as a minimum.  

Anyways all that to say, I should have checked the versions earlier, but this build this did exactly what I needed, and at least gave me something to go after.  I was able to install a newer version of git, and now everything seems to be working fine.

Thanks a lot for your help, and speedy response.  If there is anything you need from me, please let me know.

Cheers!
--thom

Mark Waite

unread,
Feb 17, 2015, 6:47:15 PM2/17/15
to jenkins...@googlegroups.com
I'm very glad that helped.  We're currently evaluating that commit to decide if it is the right approach for easier failure diagnostics in using the command line git plugin.

In your case, we could have inserted a git version check and warned you, but we have many users that run versions which are older than the official versions.  Apparently none of them run versions as old as 1.6.0.2, but I know there are versions at least as old as 1.7.2.5, since that is the default version shipped with Debian 6 (and is a version I test in my personal CI setup).

Thanks,
Mark Waite



For more options, visit https://groups.google.com/d/optout.



--
Thanks!
Mark Waite
Reply all
Reply to author
Forward
0 new messages