git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Error cloning from Git Repository
@ 2009-05-07 12:25 kanagesh radhakrishnan
  0 siblings, 0 replies; 4+ messages in thread
From: kanagesh radhakrishnan @ 2009-05-07 12:25 UTC (permalink / raw)
  To: git

Hello All,

I am trying to setup a git repository and then publish it using
git-daemon and inetd for other developers in the network to access the
sources.

Server Setup
-------------------
Host system running on Fedora Core 8
Git version 1.5.4.3

A summary of what I have done to setup the Git server is as follows:
$ mkdir /home/kanagesh/test-repo
$ cd test-repo
$ vi test.c <insert text, save, quit>
$ git-init-db
$ git-config user.name kanagesh
$ git-config user.email rkanagesh@gmail.com
$ git-add test.c
$ git-commit -a -m"Initial Commit"

# mkdir -p /var/cache/git
# ln -s /home/kanagesh/test-repo/.git test-repo
# ls -l
    test-repo -> /home/kanagesh/test-repo/.git

xinetd has been setup to listen for git requests on port 9418 and
spawn git-daemon.  This has been done by placing a config file named
'git' under /etc/xinetd.d.  The contents of the config file is as
follows:

service git
{
        disable        = no
        type            = UNLISTED
        port             = 9418
        socket_type = stream
        wait             = no
        user            = nobody
        server          = /usr/local/bin/git-daemon
        server_args     = --inetd --export-all
--base-path=/var/cache/git --syslog --verbose
        log_on_failure  += USERID
}


Clone from the Server
-------------------------------
When I attempt to clone the source from the Git server, I end up with
the following error:

[kanagesh@localhost test]$ git-clone git://192.168.13.171/test-repo
Initialized empty Git repository in /home/kanagesh/work/test/test-repo/.git/
fatal: The remote end hung up unexpectedly
fetch-pack from 'git://192.168.13.171/test-repo' failed.

On checking the log messages in /var/log/messages, I see the following:

May  7 17:29:19 localhost xinetd[17108]: START: git pid=17128
from=::ffff:192.168.13.171
May  7 17:29:19 localhost git-daemon: [17128] Connection from
192.168.13.171:42360
May  7 17:29:19 localhost git-daemon: [17128] Extended attributes (21
bytes) exist <host=192.168.13.171>
May  7 17:29:19 localhost git-daemon: [17128] Request upload-pack for
'/test-repo'
May  7 17:29:19 localhost xinetd[17108]: EXIT: git status=255
pid=17128 duration=0(sec)

Can anyone tell me what I am doing incorrectly?  Any pointers on how
to get a more verbose log from git-daemon would also be very helpful.

Thanks in advance.

Regards,
Kanagesh

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Error cloning from Git Repository
       [not found]   ` <ece1079f0905112019l549ee47h4ec8b14b3ad9688a@mail.gmail.com>
@ 2009-05-12  7:11     ` Michael J Gruber
  0 siblings, 0 replies; 4+ messages in thread
From: Michael J Gruber @ 2009-05-12  7:11 UTC (permalink / raw)
  To: kanagesh radhakrishnan; +Cc: Git Mailing List

[I'm putting the list back on cc:, I assume that's in your interest.]

kanagesh radhakrishnan venit, vidit, dixit 12.05.2009 05:19:
> Hello Michael and all,
> 
> Thank you for the response.
> 
> The version of git on the client machines that I have tried on are
> 1.5.4.3 and 1.6.2.1.
> 
> Please see my replies inline.
> 
> Thanks and regards,
> Kanagesh
> 
> On Fri, May 8, 2009 at 1:20 PM, Michael J Gruber
> <git@drmicha.warpmail.net> wrote:
>> kanagesh radhakrishnan venit, vidit, dixit 08.05.2009 06:05:
>>> Hello All,
>>>
>>> I am trying to setup a git repository and then publish it using
>>> git-daemon and inetd for other developers in the network to access the
>>> sources.
>>>
>>> Server Setup
>>> -------------------
>>> Host system running on Fedora Core 8
>>> Git version 1.5.4.3
>>>
>>> A summary of what I have done to setup the Git server is as follows:
>>> $ mkdir /home/kanagesh/test-repo
>>> $ cd test-repo
>>> $ vi test.c <insert text, save, quit>
>>> $ git-init-db
>>> $ git-config user.name kanagesh
>>> $ git-config user.email rkanagesh@gmail.com
>>> $ git-add test.c
>>> $ git-commit -a -m"Initial Commit"
>>>
>>> # mkdir -p /var/cache/git
>>
>> I assume you're doing a "cd /var/cache/git" before the next lines ;)
> 
> Yes, indeed.  I am doing that :-)
> 
>>> # ln -s /home/kanagesh/test-repo/.git test-repo
>>> # ls -l
>>>    test-repo -> /home/kanagesh/test-repo/.git
>>
>> Does "nobody" have access to /var/cache/git and /home/kanagesh/test-repo/?
> 
> The only user who seems to have access to these folders is 'kanagesh'
> However, a git-clone command issued by user kanagesh also results in
> the same failure.

Do you mean git-clone with a remote URL (git://ip/...)? In that case
your local user does not matter at all: git-clone talks to git-daemon,
git-daemon runs as "nobody" (per your inetd config), and "nobody" has no
access to the repo. If you use git-daemon you need to make sure that the
user which git-daemon runs as can access the repo.

For a quick check you can run git-daemon as kanagesh and restart it. The
real solution is to make the repo accessible to "nobody", or better yet
to a dedicated user "gitdaemon" or such which you create and which would
be the user to run git-daemon.

> 
> How can I provide you with more information for this?
> 
>>
>>>
>>> xinetd has been setup to listen for git requests on port 9418 and
>>> spawn git-daemon.  This has been done by placing a config file named
>>> 'git' under /etc/xinetd.d.  The contents of the config file is as
>>> follows:
>>>
>>> service git
>>> {
>>>        disable        = no
>>>        type            = UNLISTED
>>>        port             = 9418
>>>        socket_type = stream
>>>        wait             = no
>>>        user            = nobody
>>>        server          = /usr/local/bin/git-daemon
>>>        server_args     = --inetd --export-all
>>> --base-path=/var/cache/git --syslog --verbose
>>>        log_on_failure  += USERID
>>> }
>>>
>>>
>>> Clone from the Server
>>> -------------------------------
>>> When I attempt to clone the source from the Git server, I end up with
>>> the following error:
>>>
>>> [kanagesh@localhost test]$ git-clone git://192.168.13.171/test-repo
>>
>> What is the git version on the client?
>>
>>> Initialized empty Git repository in /home/kanagesh/work/test/test-repo/.git/
>>> fatal: The remote end hung up unexpectedly
>>> fetch-pack from 'git://192.168.13.171/test-repo' failed.
>>>
>>> On checking the log messages in /var/log/messages, I see the following:
>>>
>>> May  7 17:29:19 localhost xinetd[17108]: START: git pid=17128
>>> from=::ffff:192.168.13.171
>>> May  7 17:29:19 localhost git-daemon: [17128] Connection from
>>> 192.168.13.171:42360
>>> May  7 17:29:19 localhost git-daemon: [17128] Extended attributes (21
>>> bytes) exist <host=192.168.13.171>
>>> May  7 17:29:19 localhost git-daemon: [17128] Request upload-pack for
>>> '/test-repo'
>>> May  7 17:29:19 localhost xinetd[17108]: EXIT: git status=255
>>> pid=17128 duration=0(sec)
>>>
>>> Can anyone tell me what I am doing incorrectly?  Any pointers on how
>>> to get a more verbose log from git-daemon would also be very helpful.
>>>
>>> Thanks in advance.
>>>
>>> Regards,
>>> Kanagesh
>>
>>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Error cloning from Git Repository
  2009-05-08  4:05 kanagesh radhakrishnan
@ 2009-05-08  7:50 ` Michael J Gruber
       [not found]   ` <ece1079f0905112019l549ee47h4ec8b14b3ad9688a@mail.gmail.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Michael J Gruber @ 2009-05-08  7:50 UTC (permalink / raw)
  To: kanagesh radhakrishnan; +Cc: git

kanagesh radhakrishnan venit, vidit, dixit 08.05.2009 06:05:
> Hello All,
> 
> I am trying to setup a git repository and then publish it using
> git-daemon and inetd for other developers in the network to access the
> sources.
> 
> Server Setup
> -------------------
> Host system running on Fedora Core 8
> Git version 1.5.4.3
> 
> A summary of what I have done to setup the Git server is as follows:
> $ mkdir /home/kanagesh/test-repo
> $ cd test-repo
> $ vi test.c <insert text, save, quit>
> $ git-init-db
> $ git-config user.name kanagesh
> $ git-config user.email rkanagesh@gmail.com
> $ git-add test.c
> $ git-commit -a -m"Initial Commit"
> 
> # mkdir -p /var/cache/git

I assume you're doing a "cd /var/cache/git" before the next lines ;)

> # ln -s /home/kanagesh/test-repo/.git test-repo
> # ls -l
>    test-repo -> /home/kanagesh/test-repo/.git

Does "nobody" have access to /var/cache/git and /home/kanagesh/test-repo/?

> 
> xinetd has been setup to listen for git requests on port 9418 and
> spawn git-daemon.  This has been done by placing a config file named
> 'git' under /etc/xinetd.d.  The contents of the config file is as
> follows:
> 
> service git
> {
>        disable        = no
>        type            = UNLISTED
>        port             = 9418
>        socket_type = stream
>        wait             = no
>        user            = nobody
>        server          = /usr/local/bin/git-daemon
>        server_args     = --inetd --export-all
> --base-path=/var/cache/git --syslog --verbose
>        log_on_failure  += USERID
> }
> 
> 
> Clone from the Server
> -------------------------------
> When I attempt to clone the source from the Git server, I end up with
> the following error:
> 
> [kanagesh@localhost test]$ git-clone git://192.168.13.171/test-repo

What is the git version on the client?

> Initialized empty Git repository in /home/kanagesh/work/test/test-repo/.git/
> fatal: The remote end hung up unexpectedly
> fetch-pack from 'git://192.168.13.171/test-repo' failed.
> 
> On checking the log messages in /var/log/messages, I see the following:
> 
> May  7 17:29:19 localhost xinetd[17108]: START: git pid=17128
> from=::ffff:192.168.13.171
> May  7 17:29:19 localhost git-daemon: [17128] Connection from
> 192.168.13.171:42360
> May  7 17:29:19 localhost git-daemon: [17128] Extended attributes (21
> bytes) exist <host=192.168.13.171>
> May  7 17:29:19 localhost git-daemon: [17128] Request upload-pack for
> '/test-repo'
> May  7 17:29:19 localhost xinetd[17108]: EXIT: git status=255
> pid=17128 duration=0(sec)
> 
> Can anyone tell me what I am doing incorrectly?  Any pointers on how
> to get a more verbose log from git-daemon would also be very helpful.
> 
> Thanks in advance.
> 
> Regards,
> Kanagesh

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Error cloning from Git Repository
@ 2009-05-08  4:05 kanagesh radhakrishnan
  2009-05-08  7:50 ` Michael J Gruber
  0 siblings, 1 reply; 4+ messages in thread
From: kanagesh radhakrishnan @ 2009-05-08  4:05 UTC (permalink / raw)
  To: git

Hello All,

I am trying to setup a git repository and then publish it using
git-daemon and inetd for other developers in the network to access the
sources.

Server Setup
-------------------
Host system running on Fedora Core 8
Git version 1.5.4.3

A summary of what I have done to setup the Git server is as follows:
$ mkdir /home/kanagesh/test-repo
$ cd test-repo
$ vi test.c <insert text, save, quit>
$ git-init-db
$ git-config user.name kanagesh
$ git-config user.email rkanagesh@gmail.com
$ git-add test.c
$ git-commit -a -m"Initial Commit"

# mkdir -p /var/cache/git
# ln -s /home/kanagesh/test-repo/.git test-repo
# ls -l
   test-repo -> /home/kanagesh/test-repo/.git

xinetd has been setup to listen for git requests on port 9418 and
spawn git-daemon.  This has been done by placing a config file named
'git' under /etc/xinetd.d.  The contents of the config file is as
follows:

service git
{
       disable        = no
       type            = UNLISTED
       port             = 9418
       socket_type = stream
       wait             = no
       user            = nobody
       server          = /usr/local/bin/git-daemon
       server_args     = --inetd --export-all
--base-path=/var/cache/git --syslog --verbose
       log_on_failure  += USERID
}


Clone from the Server
-------------------------------
When I attempt to clone the source from the Git server, I end up with
the following error:

[kanagesh@localhost test]$ git-clone git://192.168.13.171/test-repo
Initialized empty Git repository in /home/kanagesh/work/test/test-repo/.git/
fatal: The remote end hung up unexpectedly
fetch-pack from 'git://192.168.13.171/test-repo' failed.

On checking the log messages in /var/log/messages, I see the following:

May  7 17:29:19 localhost xinetd[17108]: START: git pid=17128
from=::ffff:192.168.13.171
May  7 17:29:19 localhost git-daemon: [17128] Connection from
192.168.13.171:42360
May  7 17:29:19 localhost git-daemon: [17128] Extended attributes (21
bytes) exist <host=192.168.13.171>
May  7 17:29:19 localhost git-daemon: [17128] Request upload-pack for
'/test-repo'
May  7 17:29:19 localhost xinetd[17108]: EXIT: git status=255
pid=17128 duration=0(sec)

Can anyone tell me what I am doing incorrectly?  Any pointers on how
to get a more verbose log from git-daemon would also be very helpful.

Thanks in advance.

Regards,
Kanagesh

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-05-12  7:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-07 12:25 Error cloning from Git Repository kanagesh radhakrishnan
2009-05-08  4:05 kanagesh radhakrishnan
2009-05-08  7:50 ` Michael J Gruber
     [not found]   ` <ece1079f0905112019l549ee47h4ec8b14b3ad9688a@mail.gmail.com>
2009-05-12  7:11     ` Michael J Gruber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).