Hi,

We've faced with the same problem in our company.

Do you used an automatic installation for git in the global configuration ?

It seems that, the Git plugin uses the first Git installation found in
Jenkins global configuration (see
https://github.com/jenkinsci/git-plugin/blob/master/src/main/java/hudson/plugins/git/UserRemoteConfig.java#L73
).
So, If the first git installation found used automatic installation, it
seems that Jenkins doesn't download/install git before doing the
git ls-remote (because your Jenkins master doesn't make any
build), resulting in :
*Failed to connect to repository : Error performing command:  ls-remote -h
gitolite@mygitrepo:/myproject.git HEAD*
*
*
The git executable isn't found here, otherwise we would have :
*Failed to connect to repository : Error performing command: git ls-remote
-h gitolite@mygitrepo:/myproject.git HEAD*

To solve this problem, I have declared a local git installation for the
master (not installed automatically) and set it in first in the global
configuration.

I hope this will help you.

Michaël Pailloncy
*
*


2013/1/4 Jeff <predato...@gmail.com>

> Thanks for the tips...I'll try and poke around with it tomorrow.  I'm
> finding Git to be a pain compared to SVN....ugh...likely loose nut behind
> the keyboard.
>
> My Jenkins server has 4GB of RAM and 2.5 GB is dedicated to tomcat running
> Jenkins but I will triple check the settings as well.  We actually have 2
> Jenkins masters now experiencing the issue that are identically configured
> (cloned VM).  One is running 40 jobs (3 Git, 37 SVN) on 3 slaves (no jobs
> run on master).  The other running only one Git job on the master (no
> slaves).
>
>
>
> On Thu, Jan 3, 2013 at 8:02 PM, Mark Waite <markwa...@yahoo.com> wrote:
>
>> There was a report of the same error message in late November that was
>> due to insufficient memory being available for the Jenkins process.  Refer
>> to
>> http://jenkins.361315.n4.nabble.com/Jenkins-GIT-ls-remote-error-td4646903.htmlfor
>>  more details on it.  I suspect that is not your issue, but it should be
>> easy to check if it is the problem.
>>
>> You could also try configuring a git repository without using gitolite
>> (for instance, use apt-get to install the git server, publish the
>> repository to /var/cache/git/repo_name, touch git-daemon-export-ok in that
>> directory, and then create a job which uses git://yourserver/git/repo_name
>> to checkout.  That idea is suggested in
>> http://stackoverflow.com/questions/12614771/configure-git-repository-in-jenkins.
>>   I don't think that is likely your problem either, but trying the fix may
>> expose the real problem to you.
>>
>> Mark Waite
>>
>>
>>
>>   ------------------------------
>> *From:* Jeff <predato...@gmail.com>
>> *To:* jenkinsci-users@googlegroups.com
>> *Sent:* Thursday, January 3, 2013 5:22 PM
>> *Subject:* Re: Git question...
>>
>> I didn't even realize those options existed...ack!
>>
>> I checked and "Fast remote polling" is NOT set.  I have not set any other
>> options beyond the repo URL.  Did I possibly miss something?
>>
>>
>>
>> On Thu, Jan 3, 2013 at 5:17 PM, Mark Waite <markwa...@yahoo.com> wrote:
>>
>> I thought that I had seen that failure when I enabled "fast remote
>> polling" and had not yet cloned  the git repository.
>>
>> My quick web search did not show that as a bug, so I may be wrong, but it
>> won't hurt to try disabling fast remote polling (it is in the Advanced
>> section of the git plugin settings for your job).  I tried to duplicate the
>> problem myself and was unable to duplicate it, so I'm probably not using
>> exactly the steps you are using.
>>
>> Mark Waite
>>
>>   ------------------------------
>> *From:* Jeff <predato...@gmail.com>
>> *To:* jenkinsci-users@googlegroups.com
>> *Sent:* Thursday, January 3, 2013 1:35 PM
>> *Subject:* Git question...
>>
>> I have some Git projects (internal gitolite repository) that I'm
>> configuring and when I put the git repo URL in, it shows this error below
>> field:
>>
>> *Failed to connect to repository : Error performing command:  ls-remote
>> -h gitolite@mygitrepo:/myproject.git HEAD*
>>
>> If I login as the user that Jenkins is running as (tomcat7 on Ubuntu
>> 12.10) and type the same command, I don't get an error, but I also don't
>> see any output of any kind.
>>
>> If I leave off the "HEAD" option, I get a response like:
>>
>> 6156c0bd163a1b9e3a878e889be53c5b80f48c36        refs/heads/master
>>
>> Am I doing something wrong?  If I just save the job, it seems to clone
>> and build just fine but I haven't tried any Maven releases yet so I don't
>> know if that works.
>>
>> I can't see in any logs what the specific error might be.  Thoughts?
>>
>> --
>> Jeff Vincent
>> predato...@gmail.com
>> See my LinkedIn profile at:
>> http://www.linkedin.com/in/rjeffreyvincent
>> I ♥ DropBox <http://db.tt/9O6LfBX> !!
>>
>>
>>
>>
>>
>> --
>> Jeff Vincent
>> predato...@gmail.com
>> See my LinkedIn profile at:
>> http://www.linkedin.com/in/rjeffreyvincent
>> I ♥ DropBox <http://db.tt/9O6LfBX> !!
>>
>>
>>
>
>
> --
> Jeff Vincent
> predato...@gmail.com
> See my LinkedIn profile at:
> http://www.linkedin.com/in/rjeffreyvincent
> I ♥ DropBox <http://db.tt/9O6LfBX> !!
>

Reply via email to