{"thread":{"id":"14119","subject":"git-clone works with ssh but not with http/https/git","startedAt":"2008-06-24T11:15:49Z","lastAt":"2008-06-25T06:56:04Z","messageCount":20,"participants":["Erez Zilber","Matthias Kestenholz","Johannes Schindelin","Jakub Narebski","Robert Haines","Johannes Sixt","Anton Gladkov","Matthieu Moy","Daniel Barkalow"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"80872","messageId":"ce513bcc0806240415h669d1725uf7b6e495995ab459@mail.gmail.com","threadId":"14119","inReplyTo":null,"subject":"git-clone works with ssh but not with http/https/git","fromName":"Erez Zilber","fromEmail":"erezzi.list@gmail.com","sentAt":"2008-06-24T11:15:49Z","receivedAt":"2008-06-24T11:15:49Z","isPatch":false,"sender":{"key":"erezzi.list@gmail.com","avatar":null},"body":"Hi,\n\nI'm able to git-clone a tree using ssh:\n\n[root@kd001 t]# git-clone\nssh://erez.zilber@kites/pub/git/erez.zilber/my_test.git\nInitialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/\nerez.zilber@kites's password:\nremote: Counting objects: 9, done.\nremote: Compressing objects: 100% (5/5), done.\nremote: Total 9 (delta 0), reused 0 (delta 0)\nReceiving objects: 100% (9/9), done.\n\nHowever, it doesn't work with http/https/git:\n\n[root@kd001 t]# git-clone http://kites/pub/git/erez.zilber/my_test.git\nInitialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/\nCannot get remote repository information.\nPerhaps git-update-server-info needs to be run there?\n\n[root@kd001 t]# git-clone https://kites/pub/git/erez.zilber/my_test.git\nInitialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/\nCannot get remote repository information.\nPerhaps git-update-server-info needs to be run there?\n\n[root@kd001 t]# git-clone git://kites/pub/git/erez.zilber/my_test.git\nInitialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/\nkites[0: 172.16.1.11]: errno=Connection refused\nfatal: unable to connect a socket (Connection refused)\nfetch-pack from 'git://kites/pub/git/erez.zilber/my_test.git' failed.\n\nWhat's the problem?\n\nThanks,\nErez\n"},{"id":"80874","messageId":"1214306517.6441.10.camel@localhost","threadId":"14119","inReplyTo":"ce513bcc0806240415h669d1725uf7b6e495995ab459@mail.gmail.com","subject":"Re: git-clone works with ssh but not with http/https/git","fromName":"Matthias Kestenholz","fromEmail":"mk@spinlock.ch","sentAt":"2008-06-24T11:21:57Z","receivedAt":"2008-06-24T11:21:57Z","isPatch":false,"sender":{"key":"matthias@spinlock.ch","avatar":"https://gravatar.com/avatar/bc18f396e70163d09ab458a341b1decb7e8b6ee3aa2c0c954ec20162e67c4d46?d=mp&s=160"},"body":"On Tue, 2008-06-24 at 14:15 +0300, Erez Zilber wrote:\n> Hi,\n> \n> I'm able to git-clone a tree using ssh:\n> \n> [root@kd001 t]# git-clone\n> ssh://erez.zilber@kites/pub/git/erez.zilber/my_test.git\n> Initialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/\n> erez.zilber@kites's password:\n> remote: Counting objects: 9, done.\n> remote: Compressing objects: 100% (5/5), done.\n> remote: Total 9 (delta 0), reused 0 (delta 0)\n> Receiving objects: 100% (9/9), done.\n> \n> However, it doesn't work with http/https/git:\n> \n> [root@kd001 t]# git-clone http://kites/pub/git/erez.zilber/my_test.git\n> Initialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/\n> Cannot get remote repository information.\n> Perhaps git-update-server-info needs to be run there?\n> \n\nMaybe you should run git-update-server-info in the repository on the\nserver?\n\n> [root@kd001 t]# git-clone https://kites/pub/git/erez.zilber/my_test.git\n> Initialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/\n> Cannot get remote repository information.\n> Perhaps git-update-server-info needs to be run there?\n\n\n﻿Maybe you should run git-update-server-info in the repository on the\nserver?\n\nBy the way, try enabling the post-update hook -- it runs\nupdate-server-info for you automatically after pushing to your server\n(make the script $GIT_DIR/hooks/post-update executable)\n\n> [root@kd001 t]# git-clone git://kites/pub/git/erez.zilber/my_test.git\n> Initialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/\n> kites[0: 172.16.1.11]: errno=Connection refused\n> fatal: unable to connect a socket (Connection refused)\n> fetch-pack from 'git://kites/pub/git/erez.zilber/my_test.git' failed.\n> \n\nIs the git daemon running on your server? You need to configure inetd or\ngit-daemon yourself, that is not done automatically for you.\n\n\n-- \nhttp://spinlock.ch/blog/\n"},{"id":"80876","messageId":"ce513bcc0806240445x6d00323g303f218504d2df53@mail.gmail.com","threadId":"14119","inReplyTo":"1214306517.6441.10.camel@localhost","subject":"Re: git-clone works with ssh but not with http/https/git","fromName":"Erez Zilber","fromEmail":"erezzi.list@gmail.com","sentAt":"2008-06-24T11:45:42Z","receivedAt":"2008-06-24T11:45:42Z","isPatch":false,"sender":{"key":"erezzi.list@gmail.com","avatar":null},"body":"On Tue, Jun 24, 2008 at 2:21 PM, Matthias Kestenholz <mk@spinlock.ch> wrote:\n> On Tue, 2008-06-24 at 14:15 +0300, Erez Zilber wrote:\n>> Hi,\n>>\n>> I'm able to git-clone a tree using ssh:\n>>\n>> [root@kd001 t]# git-clone\n>> ssh://erez.zilber@kites/pub/git/erez.zilber/my_test.git\n>> Initialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/\n>> erez.zilber@kites's password:\n>> remote: Counting objects: 9, done.\n>> remote: Compressing objects: 100% (5/5), done.\n>> remote: Total 9 (delta 0), reused 0 (delta 0)\n>> Receiving objects: 100% (9/9), done.\n>>\n>> However, it doesn't work with http/https/git:\n>>\n>> [root@kd001 t]# git-clone http://kites/pub/git/erez.zilber/my_test.git\n>> Initialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/\n>> Cannot get remote repository information.\n>> Perhaps git-update-server-info needs to be run there?\n>>\n>\n> Maybe you should run git-update-server-info in the repository on the\n> server?\n\nForgot to mention - I tried to run git-update-server-info from the\nrepository on the server. I got the same results. BTW - if it works OK\nwith ssh, I can only guess that git-update-server-info won't help for\nhttp. right?\n\n>\n>> [root@kd001 t]# git-clone https://kites/pub/git/erez.zilber/my_test.git\n>> Initialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/\n>> Cannot get remote repository information.\n>> Perhaps git-update-server-info needs to be run there?\n>\n>\n> ﻿Maybe you should run git-update-server-info in the repository on the\n> server?\n>\n> By the way, try enabling the post-update hook -- it runs\n> update-server-info for you automatically after pushing to your server\n> (make the script $GIT_DIR/hooks/post-update executable)\n\nMake it executable on the client side before pushing (i.e. in\n.git/hooks/post-update) or on the server side after pushing?\n\n>\n>> [root@kd001 t]# git-clone git://kites/pub/git/erez.zilber/my_test.git\n>> Initialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/\n>> kites[0: 172.16.1.11]: errno=Connection refused\n>> fatal: unable to connect a socket (Connection refused)\n>> fetch-pack from 'git://kites/pub/git/erez.zilber/my_test.git' failed.\n>>\n>\n> Is the git daemon running on your server? You need to configure inetd or\n> git-daemon yourself, that is not done automatically for you.\n>\n\nI ran git-daemon on the server side like this:\n\nsudo git-daemon --base-path=/pub/git/ --export-all --listen=kites\n\nErez\n"},{"id":"80877","messageId":"alpine.DEB.1.00.0806241246500.9925@racer","threadId":"14119","inReplyTo":"ce513bcc0806240445x6d00323g303f218504d2df53@mail.gmail.com","subject":"Re: git-clone works with ssh but not with http/https/git","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-06-24T11:48:19Z","receivedAt":"2008-06-24T11:48:19Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 24 Jun 2008, Erez Zilber wrote:\n\n> On Tue, Jun 24, 2008 at 2:21 PM, Matthias Kestenholz <mk@spinlock.ch> wrote:\n> > On Tue, 2008-06-24 at 14:15 +0300, Erez Zilber wrote:\n> >\n> >> [root@kd001 t]# git-clone http://kites/pub/git/erez.zilber/my_test.git\n> >> Initialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/\n> >> Cannot get remote repository information.\n> >> Perhaps git-update-server-info needs to be run there?\n> >>\n> >\n> > Maybe you should run git-update-server-info in the repository on the\n> > server?\n> \n> Forgot to mention - I tried to run git-update-server-info from the\n> repository on the server.\n\nNo, you did not.  Otherwise, the message would not appear.  It can be that \nyou have _another_ repository on the server, but running \nupdate-server-info there does not help.\n\n> I got the same results. BTW - if it works OK with ssh, I can only guess \n> that git-update-server-info won't help for http. right?\n\nWrong again.  ssh transport is special, and does not need the information \nupdate-server-info provides.\n\nHth,\nDscho\n"},{"id":"80878","messageId":"ce513bcc0806240507q58c2a3y5fe8f0e8033353ad@mail.gmail.com","threadId":"14119","inReplyTo":"alpine.DEB.1.00.0806241246500.9925@racer","subject":"Re: git-clone works with ssh but not with http/https/git","fromName":"Erez Zilber","fromEmail":"erezzi.list@gmail.com","sentAt":"2008-06-24T12:07:47Z","receivedAt":"2008-06-24T12:07:47Z","isPatch":false,"sender":{"key":"erezzi.list@gmail.com","avatar":null},"body":"On Tue, Jun 24, 2008 at 2:48 PM, Johannes Schindelin\n<Johannes.Schindelin@gmx.de> wrote:\n> Hi,\n>\n> On Tue, 24 Jun 2008, Erez Zilber wrote:\n>\n>> On Tue, Jun 24, 2008 at 2:21 PM, Matthias Kestenholz <mk@spinlock.ch> wrote:\n>> > On Tue, 2008-06-24 at 14:15 +0300, Erez Zilber wrote:\n>> >\n>> >> [root@kd001 t]# git-clone http://kites/pub/git/erez.zilber/my_test.git\n>> >> Initialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/\n>> >> Cannot get remote repository information.\n>> >> Perhaps git-update-server-info needs to be run there?\n>> >>\n>> >\n>> > Maybe you should run git-update-server-info in the repository on the\n>> > server?\n>>\n>> Forgot to mention - I tried to run git-update-server-info from the\n>> repository on the server.\n>\n> No, you did not.  Otherwise, the message would not appear.  It can be that\n> you have _another_ repository on the server, but running\n> update-server-info there does not help.\n\nThanks for the quick answer. I'm sure that something _is_ wrong.\nOtherwise, everything should have worked already.\n\nI think that I'm using the right repository for git-clone because it's\nthe same path that I used for git push:\n\n[root@kd001 my_test.git]# git-push --all\nssh://erez.zilber@kites/pub/git/erez.zilber/my_test.git\nerez.zilber@kites's password:\nCounting objects: 9, done.\nCompressing objects: 100% (5/5), done.\nWriting objects: 100% (9/9), 740 bytes, done.\nTotal 9 (delta 0), reused 0 (delta 0)\nTo ssh://erez.zilber@kites/pub/git/erez.zilber/my_test.git\n * [new branch]      master -> master\n\nNow, on the server side:\n\n-sh-3.1$ cd my_test.git/\n-sh-3.1$ ls info/\nexclude\n-sh-3.1$ git-update-server-info\n-sh-3.1$ ls info/\nexclude  refs\n\nlooks like git-update-server-info did some work (added the refs file).\n\nBack to the client:\n\n[root@kd001 t]# git-clone http://kites/pub/git/erez.zilber/my_test.git\nInitialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/\nCannot get remote repository information.\nPerhaps git-update-server-info needs to be run there?\n\nThe path is the same path that was used for pushing the repository.\nWhat did I miss here?\n\nThanks,\nErez\n"},{"id":"80883","messageId":"m3abhbkoe2.fsf@localhost.localdomain","threadId":"14119","inReplyTo":"ce513bcc0806240507q58c2a3y5fe8f0e8033353ad@mail.gmail.com","subject":"Re: git-clone works with ssh but not with http/https/git","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-06-24T12:25:22Z","receivedAt":"2008-06-24T12:25:22Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"\"Erez Zilber\" <erezzi.list@gmail.com> writes:\n\n> I think that I'm using the right repository for git-clone because it's\n> the same path that I used for git push:\n> \n> [root@kd001 my_test.git]# git-push --all\n> ssh://erez.zilber@kites/pub/git/erez.zilber/my_test.git\n\n[...]\n> looks like git-update-server-info did some work (added the refs file).\n> \n> Back to the client:\n> \n> [root@kd001 t]# git-clone http://kites/pub/git/erez.zilber/my_test.git\n> Initialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/\n> Cannot get remote repository information.\n> Perhaps git-update-server-info needs to be run there?\n> \n> The path is the same path that was used for pushing the repository.\n> What did I miss here?\n\nFirst, obvious question: do you have web server enabled?\n\nSecond, less obvious: how this server maps pathname information from\nURL into path in the filesystem?\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"80885","messageId":"A3460448-8007-4E02-AC20-85C1A8C85786@manchester.ac.uk","threadId":"14119","inReplyTo":"ce513bcc0806240445x6d00323g303f218504d2df53@mail.gmail.com","subject":"Re: git-clone works with ssh but not with http/https/git","fromName":"Robert Haines","fromEmail":"rhaines@manchester.ac.uk","sentAt":"2008-06-24T12:35:26Z","receivedAt":"2008-06-24T12:35:26Z","isPatch":false,"sender":{"key":"rhaines@manchester.ac.uk","avatar":null},"body":"> I ran git-daemon on the server side like this:\n>\n> sudo git-daemon --base-path=/pub/git/ --export-all --listen=kites\n\nSo your clone address for git:// is wrong, you don't need the /pub/git:\ngit clone git://erez.zilber@kites/erez.zilber/my_test.git\nAs you've moved the root of the filesystem as far as git-daemon is  \nconcerned to /pub/git with the --base-path option. I suspect a similar  \nproblem for http[s] depending on how you've mapped /pub/git into your  \nwebserver.\n\nrather than:\ngit clone ssh://erez.zilber@kites/pub/git/erez.zilber/my_test.git\nfor ssh which does start at the root of the filesystem.\n\nCheers,\nRob\n"},{"id":"80887","messageId":"4860EB82.8030504@viscovery.net","threadId":"14119","inReplyTo":"ce513bcc0806240507q58c2a3y5fe8f0e8033353ad@mail.gmail.com","subject":"Re: git-clone works with ssh but not with http/https/git","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2008-06-24T12:41:38Z","receivedAt":"2008-06-24T12:41:38Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Erez Zilber schrieb:\n> [root@kd001 my_test.git]# git-push --all\n> ssh://erez.zilber@kites/pub/git/erez.zilber/my_test.git\n> erez.zilber@kites's password:\n> Counting objects: 9, done.\n> Compressing objects: 100% (5/5), done.\n> Writing objects: 100% (9/9), 740 bytes, done.\n> Total 9 (delta 0), reused 0 (delta 0)\n> To ssh://erez.zilber@kites/pub/git/erez.zilber/my_test.git\n>  * [new branch]      master -> master\n> \n> Now, on the server side:\n> \n> -sh-3.1$ cd my_test.git/\n> -sh-3.1$ ls info/\n> exclude\n> -sh-3.1$ git-update-server-info\n> -sh-3.1$ ls info/\n> exclude  refs\n> \n> looks like git-update-server-info did some work (added the refs file).\n> \n> Back to the client:\n> \n> [root@kd001 t]# git-clone http://kites/pub/git/erez.zilber/my_test.git\n> Initialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/\n> Cannot get remote repository information.\n> Perhaps git-update-server-info needs to be run there?\n> \n> The path is the same path that was used for pushing the repository.\n\nNo, it's not. You pushed via ssh, but you clone via http.\n\nWhen you point your web browser to\n\n http://kites/pub/git/erez.zilber/my_test.git\n\nwhat do you see? Error 404 or a directory listing?\n\n-- Hannes\n"},{"id":"80893","messageId":"ce513bcc0806240642g56ca5450t4edd24fd88ce79c7@mail.gmail.com","threadId":"14119","inReplyTo":"m3abhbkoe2.fsf@localhost.localdomain","subject":"Re: git-clone works with ssh but not with http/https/git","fromName":"Erez Zilber","fromEmail":"erezzi.list@gmail.com","sentAt":"2008-06-24T13:42:14Z","receivedAt":"2008-06-24T13:42:14Z","isPatch":false,"sender":{"key":"erezzi.list@gmail.com","avatar":null},"body":"On Tue, Jun 24, 2008 at 3:25 PM, Jakub Narebski <jnareb@gmail.com> wrote:\n> \"Erez Zilber\" <erezzi.list@gmail.com> writes:\n>\n>> I think that I'm using the right repository for git-clone because it's\n>> the same path that I used for git push:\n>>\n>> [root@kd001 my_test.git]# git-push --all\n>> ssh://erez.zilber@kites/pub/git/erez.zilber/my_test.git\n>\n> [...]\n>> looks like git-update-server-info did some work (added the refs file).\n>>\n>> Back to the client:\n>>\n>> [root@kd001 t]# git-clone http://kites/pub/git/erez.zilber/my_test.git\n>> Initialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/\n>> Cannot get remote repository information.\n>> Perhaps git-update-server-info needs to be run there?\n>>\n>> The path is the same path that was used for pushing the repository.\n>> What did I miss here?\n>\n> First, obvious question: do you have web server enabled?\n>\n\nYes\n\n> Second, less obvious: how this server maps pathname information from\n> URL into path in the filesystem?\n\nI guess that the problem is that no proper mapping exists. That's why\nI see the following in /var/log/httpd/error_log:\n\n[Tue Jun 24 16:31:52 2008] [error] [client 172.16.0.7] File does not\nexist: /var/www/html/pub\n\nWhat do I need to add in /etc/httpd/conf.d/ in order to set the\nmapping to /pub/git instead of /var/www/html/pub ? Is there an example\nthat shows how to map?\n\nThanks,\nErez\n"},{"id":"80894","messageId":"ce513bcc0806240653i45044297t3b963940c5b3daf0@mail.gmail.com","threadId":"14119","inReplyTo":"A3460448-8007-4E02-AC20-85C1A8C85786@manchester.ac.uk","subject":"Re: git-clone works with ssh but not with http/https/git","fromName":"Erez Zilber","fromEmail":"erezzi.list@gmail.com","sentAt":"2008-06-24T13:53:00Z","receivedAt":"2008-06-24T13:53:00Z","isPatch":false,"sender":{"key":"erezzi.list@gmail.com","avatar":null},"body":"On Tue, Jun 24, 2008 at 3:35 PM, Robert Haines <rhaines@manchester.ac.uk> wrote:\n>> I ran git-daemon on the server side like this:\n>>\n>> sudo git-daemon --base-path=/pub/git/ --export-all --listen=kites\n>\n> So your clone address for git:// is wrong, you don't need the /pub/git:\n> git clone git://erez.zilber@kites/erez.zilber/my_test.git\n> As you've moved the root of the filesystem as far as git-daemon is concerned\n> to /pub/git with the --base-path option.\n\nI understand. However, when I try to run it according to your suggestion:\n\n[root@kd001 t]# git clone git://erez.zilber@kites/erez.zilber/my_test.git\nInitialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/\nfatal: Unable to look up erez.zilber@kites (port 9418) (Name or\nservice not known)\nfetch-pack from 'git://erez.zilber@kites/erez.zilber/my_test.git' failed.\n\nI also tried to run it without \"erez.zilber@\":\n\n[root@kd001 t]# git clone git://kites/erez.zilber/my_test.git\nInitialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/\nkites[0: 172.16.1.11]: errno=Connection refused\nfatal: unable to connect a socket (Connection refused)\nfetch-pack from 'git://kites/erez.zilber/my_test.git' failed.\n\nIs there any log file on the server that can help me trace this\nproblem (something like /var/log/httpd/error_log but for the git\nprotocol)?\n\nThanks,\nErez\n"},{"id":"80895","messageId":"20080624135429.GA6905@atn.sw.ru","threadId":"14119","inReplyTo":"ce513bcc0806240642g56ca5450t4edd24fd88ce79c7@mail.gmail.com","subject":"Re: git-clone works with ssh but not with http/https/git","fromName":"Anton Gladkov","fromEmail":"agladkov@parallels.com","sentAt":"2008-06-24T13:54:29Z","receivedAt":"2008-06-24T13:54:29Z","isPatch":false,"sender":{"key":"agladkov@parallels.com","avatar":null},"body":"On Tue, Jun 24, 2008 at 05:42:14PM +0400, Erez Zilber wrote:\n> I guess that the problem is that no proper mapping exists. That's why\n> I see the following in /var/log/httpd/error_log:\n> \n> [Tue Jun 24 16:31:52 2008] [error] [client 172.16.0.7] File does not\n> exist: /var/www/html/pub\n> \n> What do I need to add in /etc/httpd/conf.d/ in order to set the\n> mapping to /pub/git instead of /var/www/html/pub ? Is there an example\n> that shows how to map?\n\nIMO the simplest way is to create a symlink 'pub' in /var/www/html directory\npointing to /pub and to add 'Options FollowSymLinks' to <Directory /> in httpd.conf.\n\n-- \nBest regards,\n\t\tAnton\nmailto:agladkov@parallels.com\n"},{"id":"80896","messageId":"20080624135911.GB6905@atn.sw.ru","threadId":"14119","inReplyTo":"20080624135429.GA6905@atn.sw.ru","subject":"Re: git-clone works with ssh but not with http/https/git","fromName":"Anton Gladkov","fromEmail":"agladkov@parallels.com","sentAt":"2008-06-24T13:59:11Z","receivedAt":"2008-06-24T13:59:11Z","isPatch":false,"sender":{"key":"agladkov@parallels.com","avatar":null},"body":"On Tue, Jun 24, 2008 at 05:54:29PM +0400, Anton Gladkov wrote:\n> On Tue, Jun 24, 2008 at 05:42:14PM +0400, Erez Zilber wrote:\n> > I guess that the problem is that no proper mapping exists. That's why\n> > I see the following in /var/log/httpd/error_log:\n> >\n> > [Tue Jun 24 16:31:52 2008] [error] [client 172.16.0.7] File does not\n> > exist: /var/www/html/pub\n> >\n> > What do I need to add in /etc/httpd/conf.d/ in order to set the\n> > mapping to /pub/git instead of /var/www/html/pub ? Is there an example\n> > that shows how to map?\n> \n> IMO the simplest way is to create a symlink 'pub' in /var/www/html directory\n> pointing to /pub and to add 'Options FollowSymLinks' to <Directory /> in httpd.conf.\n\nBut, I think it will not help you.\nAFAIK you need a gitweb.\n\n\n-- \nBest regards,\n\t\tAnton\nmailto:agladkov@parallels.com\n"},{"id":"80898","messageId":"1214316153.6441.24.camel@localhost","threadId":"14119","inReplyTo":"20080624135911.GB6905@atn.sw.ru","subject":"Re: git-clone works with ssh but not with http/https/git","fromName":"Matthias Kestenholz","fromEmail":"mk@spinlock.ch","sentAt":"2008-06-24T14:02:33Z","receivedAt":"2008-06-24T14:02:33Z","isPatch":false,"sender":{"key":"matthias@spinlock.ch","avatar":"https://gravatar.com/avatar/bc18f396e70163d09ab458a341b1decb7e8b6ee3aa2c0c954ec20162e67c4d46?d=mp&s=160"},"body":"On Tue, 2008-06-24 at 17:59 +0400, Anton Gladkov wrote:\n> On Tue, Jun 24, 2008 at 05:54:29PM +0400, Anton Gladkov wrote:\n> > On Tue, Jun 24, 2008 at 05:42:14PM +0400, Erez Zilber wrote:\n> > > I guess that the problem is that no proper mapping exists. That's why\n> > > I see the following in /var/log/httpd/error_log:\n> > >\n> > > [Tue Jun 24 16:31:52 2008] [error] [client 172.16.0.7] File does not\n> > > exist: /var/www/html/pub\n> > >\n> > > What do I need to add in /etc/httpd/conf.d/ in order to set the\n> > > mapping to /pub/git instead of /var/www/html/pub ? Is there an example\n> > > that shows how to map?\n> > \n> > IMO the simplest way is to create a symlink 'pub' in /var/www/html directory\n> > pointing to /pub and to add 'Options FollowSymLinks' to <Directory /> in httpd.conf.\n> \n> But, I think it will not help you.\n> AFAIK you need a gitweb.\n> \n\nTo be able to use the HTTP git transport? No. If you use the HTTP\ntransport to clone a repository, gitweb is not used in any way.\n\n\n-- \nhttp://spinlock.ch/blog/\n"},{"id":"80900","messageId":"vpqzlpbapy9.fsf@bauges.imag.fr","threadId":"14119","inReplyTo":"ce513bcc0806240642g56ca5450t4edd24fd88ce79c7@mail.gmail.com","subject":"Re: git-clone works with ssh but not with http/https/git","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2008-06-24T14:05:18Z","receivedAt":"2008-06-24T14:05:18Z","isPatch":false,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"\"Erez Zilber\" <erezzi.list@gmail.com> writes:\n\n> I guess that the problem is that no proper mapping exists. That's why\n> I see the following in /var/log/httpd/error_log:\n>\n> [Tue Jun 24 16:31:52 2008] [error] [client 172.16.0.7] File does not\n> exist: /var/www/html/pub\n>\n> What do I need to add in /etc/httpd/conf.d/ in order to set the\n> mapping to /pub/git instead of /var/www/html/pub ? Is there an example\n> that shows how to map?\n\nTry to access the repository from a web browser first. If you don't\nhave directory listing enabled, opening a file like HEAD should work.\n\n-- \nMatthieu\n"},{"id":"80899","messageId":"BC8F2A2A-9817-401B-BAC3-F36ED42976E5@manchester.ac.uk","threadId":"14119","inReplyTo":"ce513bcc0806240653i45044297t3b963940c5b3daf0@mail.gmail.com","subject":"Re: git-clone works with ssh but not with http/https/git","fromName":"Robert Haines","fromEmail":"rhaines@manchester.ac.uk","sentAt":"2008-06-24T14:08:16Z","receivedAt":"2008-06-24T14:08:16Z","isPatch":false,"sender":{"key":"rhaines@manchester.ac.uk","avatar":null},"body":">> So your clone address for git:// is wrong, you don't need the /pub/ \n>> git:\n>> git clone git://erez.zilber@kites/erez.zilber/my_test.git\n>> As you've moved the root of the filesystem as far as git-daemon is  \n>> concerned\n>> to /pub/git with the --base-path option.\n>\n> I understand. However, when I try to run it according to your  \n> suggestion:\n>\n> [root@kd001 t]# git clone git://erez.zilber@kites/erez.zilber/ \n> my_test.git\n> Initialized empty Git repository in /home/erez.zilber/work/tmp/t/ \n> my_test/.git/\n> fatal: Unable to look up erez.zilber@kites (port 9418) (Name or\n> service not known)\n> fetch-pack from 'git://erez.zilber@kites/erez.zilber/my_test.git'  \n> failed.\n\nThat error is saying that the name of the service is wrong, so you're  \nright to do it without the \"erez.zilber@\" bit.\n\n> I also tried to run it without \"erez.zilber@\":\n>\n> [root@kd001 t]# git clone git://kites/erez.zilber/my_test.git\n> Initialized empty Git repository in /home/erez.zilber/work/tmp/t/ \n> my_test/.git/\n> kites[0: 172.16.1.11]: errno=Connection refused\n> fatal: unable to connect a socket (Connection refused)\n> fetch-pack from 'git://kites/erez.zilber/my_test.git' failed.\n\nThis looks like that either there is nothing listening (if you're  \nrunning though xinetd have you restarted it? And have you added the  \nright bits to /etc/services?) or there's a firewall in the way... git  \ndefaults to 9418 so check that it's open.\n\n> Is there any log file on the server that can help me trace this\n> problem (something like /var/log/httpd/error_log but for the git\n> protocol)?\n\n\non my machine (running via xinetd) it goes straight into /var/log/ \nmessages. A grep -i git on that file should produce something.\n\nCheers,\nRob\n"},{"id":"80901","messageId":"ce513bcc0806240716o2556a187wef877fc51ebe9606@mail.gmail.com","threadId":"14119","inReplyTo":"20080624135429.GA6905@atn.sw.ru","subject":"Re: git-clone works with ssh but not with http/https/git","fromName":"Erez Zilber","fromEmail":"erezzi.list@gmail.com","sentAt":"2008-06-24T14:16:50Z","receivedAt":"2008-06-24T14:16:50Z","isPatch":false,"sender":{"key":"erezzi.list@gmail.com","avatar":null},"body":"On Tue, Jun 24, 2008 at 4:54 PM, Anton Gladkov <agladkov@parallels.com> wrote:\n> On Tue, Jun 24, 2008 at 05:42:14PM +0400, Erez Zilber wrote:\n>> I guess that the problem is that no proper mapping exists. That's why\n>> I see the following in /var/log/httpd/error_log:\n>>\n>> [Tue Jun 24 16:31:52 2008] [error] [client 172.16.0.7] File does not\n>> exist: /var/www/html/pub\n>>\n>> What do I need to add in /etc/httpd/conf.d/ in order to set the\n>> mapping to /pub/git instead of /var/www/html/pub ? Is there an example\n>> that shows how to map?\n>\n> IMO the simplest way is to create a symlink 'pub' in /var/www/html directory\n> pointing to /pub and to add 'Options FollowSymLinks' to <Directory /> in httpd.conf.\n\nAdding the symlink solved the cloning with http problem.\n\nThanks,\nErez\n"},{"id":"80905","messageId":"ce513bcc0806240745l365b2d22ga007deb01a93e4b6@mail.gmail.com","threadId":"14119","inReplyTo":"BC8F2A2A-9817-401B-BAC3-F36ED42976E5@manchester.ac.uk","subject":"Re: git-clone works with ssh but not with http/https/git","fromName":"Erez Zilber","fromEmail":"erezzi.list@gmail.com","sentAt":"2008-06-24T14:45:07Z","receivedAt":"2008-06-24T14:45:07Z","isPatch":false,"sender":{"key":"erezzi.list@gmail.com","avatar":null},"body":"On Tue, Jun 24, 2008 at 5:08 PM, Robert Haines <rhaines@manchester.ac.uk> wrote:\n>>> So your clone address for git:// is wrong, you don't need the /pub/git:\n>>> git clone git://erez.zilber@kites/erez.zilber/my_test.git\n>>> As you've moved the root of the filesystem as far as git-daemon is\n>>> concerned\n>>> to /pub/git with the --base-path option.\n>>\n>> I understand. However, when I try to run it according to your suggestion:\n>>\n>> [root@kd001 t]# git clone git://erez.zilber@kites/erez.zilber/my_test.git\n>> Initialized empty Git repository in\n>> /home/erez.zilber/work/tmp/t/my_test/.git/\n>> fatal: Unable to look up erez.zilber@kites (port 9418) (Name or\n>> service not known)\n>> fetch-pack from 'git://erez.zilber@kites/erez.zilber/my_test.git' failed.\n>\n> That error is saying that the name of the service is wrong, so you're right\n> to do it without the \"erez.zilber@\" bit.\n>\n>> I also tried to run it without \"erez.zilber@\":\n>>\n>> [root@kd001 t]# git clone git://kites/erez.zilber/my_test.git\n>> Initialized empty Git repository in\n>> /home/erez.zilber/work/tmp/t/my_test/.git/\n>> kites[0: 172.16.1.11]: errno=Connection refused\n>> fatal: unable to connect a socket (Connection refused)\n>> fetch-pack from 'git://kites/erez.zilber/my_test.git' failed.\n>\n> This looks like that either there is nothing listening (if you're running\n> though xinetd have you restarted it? And have you added the right bits to\n> /etc/services?) or there's a firewall in the way... git defaults to 9418 so\n> check that it's open.\n\nThe problem was that it listened to requests coming from the local\nmachine. Now (after fixing that), everything seems to work. Thanks for\nthe help.\n\nBTW - I'm currently running git-daemon in the following way:\n\nsudo git-daemon --base-path=/pub/git/ --export-all\n\nIs there any advantage to run it through xinetd? How do you run it?\n\nThanks,\nErez\n"},{"id":"80927","messageId":"alpine.LNX.1.00.0806241305150.19665@iabervon.org","threadId":"14119","inReplyTo":"ce513bcc0806240745l365b2d22ga007deb01a93e4b6@mail.gmail.com","subject":"Re: git-clone works with ssh but not with http/https/git","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2008-06-24T17:10:32Z","receivedAt":"2008-06-24T17:10:32Z","isPatch":false,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Tue, 24 Jun 2008, Erez Zilber wrote:\n\n> BTW - I'm currently running git-daemon in the following way:\n> \n> sudo git-daemon --base-path=/pub/git/ --export-all\n> \n> Is there any advantage to run it through xinetd? How do you run it?\n\nYou probably want to run it from something that init runs, or you'll have \nto figure it out again when you reboot the server in a while. So you \neither want a suitable init script (Gentoo, for example, has one in their \ngit package), or to run it through xinetd (which you almost certainly have \nan init script for).\n\n\t-Daniel\n*This .sig left intentionally blank*\n"},{"id":"80946","messageId":"200806242058.13721.jnareb@gmail.com","threadId":"14119","inReplyTo":"20080624135429.GA6905@atn.sw.ru","subject":"Re: git-clone works with ssh but not with http/https/git","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-06-24T18:58:13Z","receivedAt":"2008-06-24T18:58:13Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"On Tue, 24 Jun 2008, Anton Gladkov wrote:\n> On Tue, Jun 24, 2008 at 05:42:14PM +0400, Erez Zilber wrote:\n> >\n> > I guess that the problem is that no proper mapping exists. That's why\n> > I see the following in /var/log/httpd/error_log:\n> > \n> > [Tue Jun 24 16:31:52 2008] [error] [client 172.16.0.7] File does not\n> > exist: /var/www/html/pub\n> > \n> > What do I need to add in /etc/httpd/conf.d/ in order to set the\n> > mapping to /pub/git instead of /var/www/html/pub ? Is there an example\n> > that shows how to map?\n> \n> IMO the simplest way is to create a symlink 'pub' in /var/www/html directory\n> pointing to /pub and to add 'Options FollowSymLinks' to <Directory /> in httpd.conf.\n\nAnother solution (not necessary simplest, but it might be preferred\nfrom the security point of view) is to do some URL rewriting / redirection.\nSee your web server documentation for details...\n\n-- \nJakub Narebski\nPoland\n"},{"id":"81085","messageId":"ce513bcc0806242356x5fd5ec85tfaa1b1b1996feac5@mail.gmail.com","threadId":"14119","inReplyTo":"alpine.LNX.1.00.0806241305150.19665@iabervon.org","subject":"Re: git-clone works with ssh but not with http/https/git","fromName":"Erez Zilber","fromEmail":"erezzi.list@gmail.com","sentAt":"2008-06-25T06:56:04Z","receivedAt":"2008-06-25T06:56:04Z","isPatch":false,"sender":{"key":"erezzi.list@gmail.com","avatar":null},"body":"On Tue, Jun 24, 2008 at 8:10 PM, Daniel Barkalow <barkalow@iabervon.org> wrote:\n> On Tue, 24 Jun 2008, Erez Zilber wrote:\n>\n>> BTW - I'm currently running git-daemon in the following way:\n>>\n>> sudo git-daemon --base-path=/pub/git/ --export-all\n>>\n>> Is there any advantage to run it through xinetd? How do you run it?\n>\n> You probably want to run it from something that init runs, or you'll have\n> to figure it out again when you reboot the server in a while. So you\n> either want a suitable init script (Gentoo, for example, has one in their\n> git package), or to run it through xinetd (which you almost certainly have\n> an init script for).\n>\n>        -Daniel\n> *This .sig left intentionally blank*\n>\n\nThanks. I was able to config xinetd, and everything seems to work now.\nI would like to thank everyone here for the quick and very useful\nhelp.\n\nErez\n"}]}