{"thread":{"id":"19243","subject":"Error cloning from Git Repository","startedAt":"2009-05-08T04:05:22Z","lastAt":"2009-05-12T07:11:43Z","messageCount":3,"participants":["kanagesh radhakrishnan","Michael J Gruber"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"113301","messageId":"ece1079f0905072105k748d4debl3c899aec3539a185@mail.gmail.com","threadId":"19243","inReplyTo":null,"subject":"Error cloning from Git Repository","fromName":"kanagesh radhakrishnan","fromEmail":"rkanagesh@gmail.com","sentAt":"2009-05-08T04:05:22Z","receivedAt":"2009-05-08T04:05:22Z","isPatch":false,"sender":{"key":"rkanagesh@gmail.com","avatar":null},"body":"Hello All,\n\nI am trying to setup a git repository and then publish it using\ngit-daemon and inetd for other developers in the network to access the\nsources.\n\nServer Setup\n-------------------\nHost system running on Fedora Core 8\nGit version 1.5.4.3\n\nA summary of what I have done to setup the Git server is as follows:\n$ mkdir /home/kanagesh/test-repo\n$ cd test-repo\n$ vi test.c <insert text, save, quit>\n$ git-init-db\n$ git-config user.name kanagesh\n$ git-config user.email rkanagesh@gmail.com\n$ git-add test.c\n$ git-commit -a -m\"Initial Commit\"\n\n# mkdir -p /var/cache/git\n# ln -s /home/kanagesh/test-repo/.git test-repo\n# ls -l\n   test-repo -> /home/kanagesh/test-repo/.git\n\nxinetd has been setup to listen for git requests on port 9418 and\nspawn git-daemon.  This has been done by placing a config file named\n'git' under /etc/xinetd.d.  The contents of the config file is as\nfollows:\n\nservice git\n{\n       disable        = no\n       type            = UNLISTED\n       port             = 9418\n       socket_type = stream\n       wait             = no\n       user            = nobody\n       server          = /usr/local/bin/git-daemon\n       server_args     = --inetd --export-all\n--base-path=/var/cache/git --syslog --verbose\n       log_on_failure  += USERID\n}\n\n\nClone from the Server\n-------------------------------\nWhen I attempt to clone the source from the Git server, I end up with\nthe following error:\n\n[kanagesh@localhost test]$ git-clone git://192.168.13.171/test-repo\nInitialized empty Git repository in /home/kanagesh/work/test/test-repo/.git/\nfatal: The remote end hung up unexpectedly\nfetch-pack from 'git://192.168.13.171/test-repo' failed.\n\nOn checking the log messages in /var/log/messages, I see the following:\n\nMay  7 17:29:19 localhost xinetd[17108]: START: git pid=17128\nfrom=::ffff:192.168.13.171\nMay  7 17:29:19 localhost git-daemon: [17128] Connection from\n192.168.13.171:42360\nMay  7 17:29:19 localhost git-daemon: [17128] Extended attributes (21\nbytes) exist <host=192.168.13.171>\nMay  7 17:29:19 localhost git-daemon: [17128] Request upload-pack for\n'/test-repo'\nMay  7 17:29:19 localhost xinetd[17108]: EXIT: git status=255\npid=17128 duration=0(sec)\n\nCan anyone tell me what I am doing incorrectly?  Any pointers on how\nto get a more verbose log from git-daemon would also be very helpful.\n\nThanks in advance.\n\nRegards,\nKanagesh\n"},{"id":"113320","messageId":"4A03E446.6050305@drmicha.warpmail.net","threadId":"19243","inReplyTo":"ece1079f0905072105k748d4debl3c899aec3539a185@mail.gmail.com","subject":"Re: Error cloning from Git Repository","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2009-05-08T07:50:30Z","receivedAt":"2009-05-08T07:50:30Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"kanagesh radhakrishnan venit, vidit, dixit 08.05.2009 06:05:\n> Hello All,\n> \n> I am trying to setup a git repository and then publish it using\n> git-daemon and inetd for other developers in the network to access the\n> sources.\n> \n> Server Setup\n> -------------------\n> Host system running on Fedora Core 8\n> Git version 1.5.4.3\n> \n> A summary of what I have done to setup the Git server is as follows:\n> $ mkdir /home/kanagesh/test-repo\n> $ cd test-repo\n> $ vi test.c <insert text, save, quit>\n> $ git-init-db\n> $ git-config user.name kanagesh\n> $ git-config user.email rkanagesh@gmail.com\n> $ git-add test.c\n> $ git-commit -a -m\"Initial Commit\"\n> \n> # mkdir -p /var/cache/git\n\nI assume you're doing a \"cd /var/cache/git\" before the next lines ;)\n\n> # ln -s /home/kanagesh/test-repo/.git test-repo\n> # ls -l\n>    test-repo -> /home/kanagesh/test-repo/.git\n\nDoes \"nobody\" have access to /var/cache/git and /home/kanagesh/test-repo/?\n\n> \n> xinetd has been setup to listen for git requests on port 9418 and\n> spawn git-daemon.  This has been done by placing a config file named\n> 'git' under /etc/xinetd.d.  The contents of the config file is as\n> follows:\n> \n> service git\n> {\n>        disable        = no\n>        type            = UNLISTED\n>        port             = 9418\n>        socket_type = stream\n>        wait             = no\n>        user            = nobody\n>        server          = /usr/local/bin/git-daemon\n>        server_args     = --inetd --export-all\n> --base-path=/var/cache/git --syslog --verbose\n>        log_on_failure  += USERID\n> }\n> \n> \n> Clone from the Server\n> -------------------------------\n> When I attempt to clone the source from the Git server, I end up with\n> the following error:\n> \n> [kanagesh@localhost test]$ git-clone git://192.168.13.171/test-repo\n\nWhat is the git version on the client?\n\n> Initialized empty Git repository in /home/kanagesh/work/test/test-repo/.git/\n> fatal: The remote end hung up unexpectedly\n> fetch-pack from 'git://192.168.13.171/test-repo' failed.\n> \n> On checking the log messages in /var/log/messages, I see the following:\n> \n> May  7 17:29:19 localhost xinetd[17108]: START: git pid=17128\n> from=::ffff:192.168.13.171\n> May  7 17:29:19 localhost git-daemon: [17128] Connection from\n> 192.168.13.171:42360\n> May  7 17:29:19 localhost git-daemon: [17128] Extended attributes (21\n> bytes) exist <host=192.168.13.171>\n> May  7 17:29:19 localhost git-daemon: [17128] Request upload-pack for\n> '/test-repo'\n> May  7 17:29:19 localhost xinetd[17108]: EXIT: git status=255\n> pid=17128 duration=0(sec)\n> \n> Can anyone tell me what I am doing incorrectly?  Any pointers on how\n> to get a more verbose log from git-daemon would also be very helpful.\n> \n> Thanks in advance.\n> \n> Regards,\n> Kanagesh\n"},{"id":"113614","messageId":"4A09212F.7030704@warpmail.net","threadId":"19243","inReplyTo":"ece1079f0905112019l549ee47h4ec8b14b3ad9688a@mail.gmail.com","subject":"Re: Error cloning from Git Repository","fromName":"Michael J Gruber","fromEmail":"drmicha@warpmail.net","sentAt":"2009-05-12T07:11:43Z","receivedAt":"2009-05-12T07:11:43Z","isPatch":false,"sender":{"key":"drmicha@warpmail.net","avatar":null},"body":"[I'm putting the list back on cc:, I assume that's in your interest.]\n\nkanagesh radhakrishnan venit, vidit, dixit 12.05.2009 05:19:\n> Hello Michael and all,\n> \n> Thank you for the response.\n> \n> The version of git on the client machines that I have tried on are\n> 1.5.4.3 and 1.6.2.1.\n> \n> Please see my replies inline.\n> \n> Thanks and regards,\n> Kanagesh\n> \n> On Fri, May 8, 2009 at 1:20 PM, Michael J Gruber\n> <git@drmicha.warpmail.net> wrote:\n>> kanagesh radhakrishnan venit, vidit, dixit 08.05.2009 06:05:\n>>> Hello All,\n>>>\n>>> I am trying to setup a git repository and then publish it using\n>>> git-daemon and inetd for other developers in the network to access the\n>>> sources.\n>>>\n>>> Server Setup\n>>> -------------------\n>>> Host system running on Fedora Core 8\n>>> Git version 1.5.4.3\n>>>\n>>> A summary of what I have done to setup the Git server is as follows:\n>>> $ mkdir /home/kanagesh/test-repo\n>>> $ cd test-repo\n>>> $ vi test.c <insert text, save, quit>\n>>> $ git-init-db\n>>> $ git-config user.name kanagesh\n>>> $ git-config user.email rkanagesh@gmail.com\n>>> $ git-add test.c\n>>> $ git-commit -a -m\"Initial Commit\"\n>>>\n>>> # mkdir -p /var/cache/git\n>>\n>> I assume you're doing a \"cd /var/cache/git\" before the next lines ;)\n> \n> Yes, indeed.  I am doing that :-)\n> \n>>> # ln -s /home/kanagesh/test-repo/.git test-repo\n>>> # ls -l\n>>>    test-repo -> /home/kanagesh/test-repo/.git\n>>\n>> Does \"nobody\" have access to /var/cache/git and /home/kanagesh/test-repo/?\n> \n> The only user who seems to have access to these folders is 'kanagesh'\n> However, a git-clone command issued by user kanagesh also results in\n> the same failure.\n\nDo you mean git-clone with a remote URL (git://ip/...)? In that case\nyour local user does not matter at all: git-clone talks to git-daemon,\ngit-daemon runs as \"nobody\" (per your inetd config), and \"nobody\" has no\naccess to the repo. If you use git-daemon you need to make sure that the\nuser which git-daemon runs as can access the repo.\n\nFor a quick check you can run git-daemon as kanagesh and restart it. The\nreal solution is to make the repo accessible to \"nobody\", or better yet\nto a dedicated user \"gitdaemon\" or such which you create and which would\nbe the user to run git-daemon.\n\n> \n> How can I provide you with more information for this?\n> \n>>\n>>>\n>>> xinetd has been setup to listen for git requests on port 9418 and\n>>> spawn git-daemon.  This has been done by placing a config file named\n>>> 'git' under /etc/xinetd.d.  The contents of the config file is as\n>>> follows:\n>>>\n>>> service git\n>>> {\n>>>        disable        = no\n>>>        type            = UNLISTED\n>>>        port             = 9418\n>>>        socket_type = stream\n>>>        wait             = no\n>>>        user            = nobody\n>>>        server          = /usr/local/bin/git-daemon\n>>>        server_args     = --inetd --export-all\n>>> --base-path=/var/cache/git --syslog --verbose\n>>>        log_on_failure  += USERID\n>>> }\n>>>\n>>>\n>>> Clone from the Server\n>>> -------------------------------\n>>> When I attempt to clone the source from the Git server, I end up with\n>>> the following error:\n>>>\n>>> [kanagesh@localhost test]$ git-clone git://192.168.13.171/test-repo\n>>\n>> What is the git version on the client?\n>>\n>>> Initialized empty Git repository in /home/kanagesh/work/test/test-repo/.git/\n>>> fatal: The remote end hung up unexpectedly\n>>> fetch-pack from 'git://192.168.13.171/test-repo' failed.\n>>>\n>>> On checking the log messages in /var/log/messages, I see the following:\n>>>\n>>> May  7 17:29:19 localhost xinetd[17108]: START: git pid=17128\n>>> from=::ffff:192.168.13.171\n>>> May  7 17:29:19 localhost git-daemon: [17128] Connection from\n>>> 192.168.13.171:42360\n>>> May  7 17:29:19 localhost git-daemon: [17128] Extended attributes (21\n>>> bytes) exist <host=192.168.13.171>\n>>> May  7 17:29:19 localhost git-daemon: [17128] Request upload-pack for\n>>> '/test-repo'\n>>> May  7 17:29:19 localhost xinetd[17108]: EXIT: git status=255\n>>> pid=17128 duration=0(sec)\n>>>\n>>> Can anyone tell me what I am doing incorrectly?  Any pointers on how\n>>> to get a more verbose log from git-daemon would also be very helpful.\n>>>\n>>> Thanks in advance.\n>>>\n>>> Regards,\n>>> Kanagesh\n>>\n>>\n"}]}