{"thread":{"id":"16419","subject":"Cannot git pull using http from my git.mycompany.com","startedAt":"2008-11-21T01:13:06Z","lastAt":"2008-11-22T11:12:49Z","messageCount":6,"participants":["Gary Yang","David Symonds","Andreas Ericsson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"96303","messageId":"562019.27220.qm@web37908.mail.mud.yahoo.com","threadId":"16419","inReplyTo":null,"subject":"Cannot git pull using http from my git.mycompany.com","fromName":"Gary Yang","fromEmail":"garyyang6@yahoo.com","sentAt":"2008-11-21T01:13:06Z","receivedAt":"2008-11-21T01:13:06Z","isPatch":false,"sender":{"key":"garyyang6@yahoo.com","avatar":null},"body":"\ngit pull http://git.mycompany.com/pub/git/u-boot.git HEAD\nfatal: http://git.mycompany.com/pub/git/u-boot.git/info/refs not found: did you run git update-server-info on the server?\n\nBelow are related gitweb configs. What did I do wrong?\n\n\nhttpd.confg\n\n<VirtualHost 10.66.4.168>\n    ServerName svdcgit01\n     DocumentRoot /pub/git\n     <Directory /var/www/cgi-bin>\n          Allow from all\n          AllowOverride all\n          Order allow,deny\n          Options ExecCGI\n          <Files gitweb.cgi>\n               SetHandler cgi-script\n          </Files>\n     </Directory>\n     DirectoryIndex /cgi-bin/gitweb.cgi\n     SetEnv  GITWEB_CONFIG  /etc/gitweb.conf\n#       RewriteEngine on\n#       RewriteRule ^/(.*\\.git/(?!/?(HEAD|info|objects|refs)).*)?$ /cgi-bin/gitweb.cgi%{REQUEST_URI}  [L,PT]\n\n\ncat /etc/gitweb.conf\n# path to git projects (<project>.git)\n$projectroot = \"/pub/git\";\n\n# directory to use for temp files\n$git_temp = \"/tmp\";\n\n# target of the home link on top of all pages\n$home_link = $my_uri;\n\n# html text to include at home page\n$home_text = \"indextext.html\";\n\n# file with project list; by default, simply scan the projectroot dir.\n$projects_list = $projectroot;\n\n# stylesheet to use\n$stylesheet = \"/gitweb/gitweb.css\";\n\n# logo to use\n#$logo = \"/git-logo.png\";\n$logo = \"/gitweb/git-logo.png\";\n\n# the 'favicon'\n$favicon = \"/gitweb/git-favicon.png\";\n\n$projects_list_description_width = 60;\n#$feature{'pathinfo'}{'default'} = [1];\n\n\n\n\n\n\n      \n"},{"id":"96313","messageId":"ee77f5c20811210043v1f3af6c5l6f5a25c12d697d2d@mail.gmail.com","threadId":"16419","inReplyTo":"562019.27220.qm@web37908.mail.mud.yahoo.com","subject":"Re: Cannot git pull using http from my git.mycompany.com","fromName":"David Symonds","fromEmail":"dsymonds@gmail.com","sentAt":"2008-11-21T08:43:52Z","receivedAt":"2008-11-21T08:43:52Z","isPatch":false,"sender":{"key":"dsymonds@gmail.com","avatar":"https://gravatar.com/avatar/b22f5051cbfc11836e36cf7a690e6cde4e225d835e13295ff98d15c7a9ee3c0f?d=mp&s=160"},"body":"On Fri, Nov 21, 2008 at 12:13 PM, Gary Yang <garyyang6@yahoo.com> wrote:\n\n> git pull http://git.mycompany.com/pub/git/u-boot.git HEAD\n> fatal: http://git.mycompany.com/pub/git/u-boot.git/info/refs not found: did you run git update-server-info on the server?\n>\n> Below are related gitweb configs. What did I do wrong?\n\nAs the error message asks, did you run git update-server-info on the server?\n\n\nDave.\n"},{"id":"96317","messageId":"4926853A.6080009@op5.se","threadId":"16419","inReplyTo":"562019.27220.qm@web37908.mail.mud.yahoo.com","subject":"Re: Cannot git pull using http from my git.mycompany.com","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2008-11-21T09:54:02Z","receivedAt":"2008-11-21T09:54:02Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Gary Yang wrote:\n> git pull http://git.mycompany.com/pub/git/u-boot.git HEAD\n> fatal: http://git.mycompany.com/pub/git/u-boot.git/info/refs not found: did you run git update-server-info on the server?\n> \n> Below are related gitweb configs. What did I do wrong?\n> \n> \n> httpd.confg\n> \n> <VirtualHost 10.66.4.168>\n>     ServerName svdcgit01\n>      DocumentRoot /pub/git\n>      <Directory /var/www/cgi-bin>\n>           Allow from all\n>           AllowOverride all\n>           Order allow,deny\n>           Options ExecCGI\n>           <Files gitweb.cgi>\n>                SetHandler cgi-script\n>           </Files>\n>      </Directory>\n>      DirectoryIndex /cgi-bin/gitweb.cgi\n>      SetEnv  GITWEB_CONFIG  /etc/gitweb.conf\n> #       RewriteEngine on\n> #       RewriteRule ^/(.*\\.git/(?!/?(HEAD|info|objects|refs)).*)?$ /cgi-bin/gitweb.cgi%{REQUEST_URI}  [L,PT]\n> \n> \n> cat /etc/gitweb.conf\n\n\nYou seem slightly confused. gitweb is not used for cloning over http.\nThe following documents would almost certainly be beneficial for you\nto read. Please don't ask any questions that are already answered in\nthose documents. If, by following the steps outlined in those docs,\nyou still cannot get things to work, please let us know what you fail\nto understand so the texts can be amended.\n\nhttp://www.kernel.org/pub/software/scm/git/docs/user-manual.html#setting-up-a-public-repository\nhttp://dtcsupport.gplhost.com/Git/Public-Repo-Howto\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"},{"id":"96347","messageId":"670486.28711.qm@web37901.mail.mud.yahoo.com","threadId":"16419","inReplyTo":"ee77f5c20811210043v1f3af6c5l6f5a25c12d697d2d@mail.gmail.com","subject":"Re: Cannot git pull using http from my git.mycompany.com","fromName":"Gary Yang","fromEmail":"garyyang6@yahoo.com","sentAt":"2008-11-21T17:34:49Z","receivedAt":"2008-11-21T17:34:49Z","isPatch":false,"sender":{"key":"garyyang6@yahoo.com","avatar":null},"body":"Yes\n\n\n--- On Fri, 11/21/08, David Symonds <dsymonds@gmail.com> wrote:\n\n> From: David Symonds <dsymonds@gmail.com>\n> Subject: Re: Cannot git pull using http from my git.mycompany.com\n> To: garyyang6@yahoo.com\n> Cc: git@vger.kernel.org\n> Date: Friday, November 21, 2008, 12:43 AM\n> On Fri, Nov 21, 2008 at 12:13 PM, Gary Yang\n> <garyyang6@yahoo.com> wrote:\n> \n> > git pull http://git.mycompany.com/pub/git/u-boot.git\n> HEAD\n> > fatal:\n> http://git.mycompany.com/pub/git/u-boot.git/info/refs not\n> found: did you run git update-server-info on the server?\n> >\n> > Below are related gitweb configs. What did I do wrong?\n> \n> As the error message asks, did you run git\n> update-server-info on the server?\n> \n> \n> Dave.\n\n\n      \n"},{"id":"96350","messageId":"354563.49837.qm@web37901.mail.mud.yahoo.com","threadId":"16419","inReplyTo":"4926853A.6080009@op5.se","subject":"Re: How to setup a public reposistory?","fromName":"Gary Yang","fromEmail":"garyyang6@yahoo.com","sentAt":"2008-11-21T20:04:02Z","receivedAt":"2008-11-21T20:04:02Z","isPatch":false,"sender":{"key":"garyyang6@yahoo.com","avatar":null},"body":"\nI followed the steps outlined by the links below. But, I am still not able to setup the public repository. I got, fatal: unable to connect a socket (Connection refused). What I did wrong? Please help.\n\nhttp://www.kernel.org/pub/software/scm/git/docs/user-manual.html#setting-up-a-public-repository\nhttp://dtcsupport.gplhost.com/Git/Public-Repo-Howto\n\n0. Prepare your name and email address\ncat ~gyang/.gitconfig\n[user]\n        email = gyang@mycompany.com\n        name = Gary Yang\n\n\n1. Create an archive to send to the server\n\n/home/gyang% git clone http://git.gplhost.com/dtc-xen.git\n\n/home/gyang% git clone --bare dtc-xen dtc-xen.git\n\n/home/gyang% touch dtc-xen.git/git-daemon-export-ok\n\n/home/gyang% tar -cvzf dtc-xen.git.tar.gz dtc-xen.git\n\n\n2. Install the archive on the web server\n\n/pub/git% tar -xvzf /home/gyang/dtc-xen.git.tar.gz\n\n/pub/git/dtc-xen.git% git --bare update-server-info\n\n/pub/git/dtc-xen.git% mv hooks/post-update.sample hooks/post-update\n\n/pub/git/dtc-xen.git% chmod +x hooks/post-update\n\n/pub/git/dtc-xen.git% cat hooks/post-update\n#!/bin/sh\n#\n# An example hook script to prepare a packed repository for use over\n# dumb transports.\n#\n# To enable this hook, rename this file to \"post-update\".\n\nexec git-update-server-info\n\n\n3. Configure and start git daemon at the web server\n\n/pub/git/dtc-xen.git% grep 9418 /etc/services\ngit             9418/tcp                        # Git Version Control System\n\n\n/pub/git/dtc-xen.git% sudo git daemon --verbose --inetd --export-all /pub/git &\n\n\n4. At my local machine. I did\n\n/home/gyang% git clone git://git.mycompany.com/pub/git/dtc-xen.git test-git\n\nInitialized empty Git repository in //home/gyang/test-git/.git/\ngit.mycompany.com[0: 10.66.4.168]: errno=Connection refused\nfatal: unable to connect a socket (Connection refused)\n\n\nps -efww | grep git\nroot      9626 22321  0 11:31 pts/1    00:00:00 git-daemon --verbose --inetd --export-all /pub/git\n\n\n\n\n\n--- On Fri, 11/21/08, Andreas Ericsson <ae@op5.se> wrote:\n\n> From: Andreas Ericsson <ae@op5.se>\n> Subject: Re: Cannot git pull using http from my git.mycompany.com\n> To: garyyang6@yahoo.com\n> Cc: git@vger.kernel.org\n> Date: Friday, November 21, 2008, 1:54 AM\n> Gary Yang wrote:\n> > git pull http://git.mycompany.com/pub/git/u-boot.git\n> HEAD\n> > fatal:\n> http://git.mycompany.com/pub/git/u-boot.git/info/refs not\n> found: did you run git update-server-info on the server?\n> > \n> > Below are related gitweb configs. What did I do wrong?\n> > \n> > \n> > httpd.confg\n> > \n> > <VirtualHost 10.66.4.168>\n> >     ServerName svdcgit01\n> >      DocumentRoot /pub/git\n> >      <Directory /var/www/cgi-bin>\n> >           Allow from all\n> >           AllowOverride all\n> >           Order allow,deny\n> >           Options ExecCGI\n> >           <Files gitweb.cgi>\n> >                SetHandler cgi-script\n> >           </Files>\n> >      </Directory>\n> >      DirectoryIndex /cgi-bin/gitweb.cgi\n> >      SetEnv  GITWEB_CONFIG  /etc/gitweb.conf\n> > #       RewriteEngine on\n> > #       RewriteRule\n> ^/(.*\\.git/(?!/?(HEAD|info|objects|refs)).*)?$\n> /cgi-bin/gitweb.cgi%{REQUEST_URI}  [L,PT]\n> > \n> > \n> > cat /etc/gitweb.conf\n> \n> \n> You seem slightly confused. gitweb is not used for cloning\n> over http.\n> The following documents would almost certainly be\n> beneficial for you\n> to read. Please don't ask any questions that are\n> already answered in\n> those documents. If, by following the steps outlined in\n> those docs,\n> you still cannot get things to work, please let us know\n> what you fail\n> to understand so the texts can be amended.\n> \n> http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#setting-up-a-public-repository\n> http://dtcsupport.gplhost.com/Git/Public-Repo-Howto\n> \n> -- Andreas Ericsson                  \n> andreas.ericsson@op5.se\n> OP5 AB                             www.op5.se\n> Tel: +46 8-230225                  Fax: +46 8-230231\n> --\n> To unsubscribe from this list: send the line\n> \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at \n> http://vger.kernel.org/majordomo-info.html\n\n\n      \n"},{"id":"96362","messageId":"4927E931.3080802@op5.se","threadId":"16419","inReplyTo":"354563.49837.qm@web37901.mail.mud.yahoo.com","subject":"Re: How to setup a public reposistory?","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2008-11-22T11:12:49Z","receivedAt":"2008-11-22T11:12:49Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Gary Yang wrote:\n> I followed the steps outlined by the links below. But, I am still not able to setup the public repository. I got, fatal: unable to connect a socket (Connection refused). What I did wrong? Please help.\n> \n> http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#setting-up-a-public-repository\n> http://dtcsupport.gplhost.com/Git/Public-Repo-Howto\n> \n> 0. Prepare your name and email address\n> cat ~gyang/.gitconfig\n> [user]\n>         email = gyang@mycompany.com\n>         name = Gary Yang\n> \n> \n> 1. Create an archive to send to the server\n> \n> /home/gyang% git clone http://git.gplhost.com/dtc-xen.git\n> \n> /home/gyang% git clone --bare dtc-xen dtc-xen.git\n> \n> /home/gyang% touch dtc-xen.git/git-daemon-export-ok\n> \n> /home/gyang% tar -cvzf dtc-xen.git.tar.gz dtc-xen.git\n> \n> \n> 2. Install the archive on the web server\n> \n> /pub/git% tar -xvzf /home/gyang/dtc-xen.git.tar.gz\n> \n> /pub/git/dtc-xen.git% git --bare update-server-info\n> \n> /pub/git/dtc-xen.git% mv hooks/post-update.sample hooks/post-update\n> \n> /pub/git/dtc-xen.git% chmod +x hooks/post-update\n> \n> /pub/git/dtc-xen.git% cat hooks/post-update\n> #!/bin/sh\n> #\n> # An example hook script to prepare a packed repository for use over\n> # dumb transports.\n> #\n> # To enable this hook, rename this file to \"post-update\".\n> \n> exec git-update-server-info\n> \n> \n> 3. Configure and start git daemon at the web server\n> \n> /pub/git/dtc-xen.git% grep 9418 /etc/services\n> git             9418/tcp                        # Git Version Control System\n> \n> \n> /pub/git/dtc-xen.git% sudo git daemon --verbose --inetd --export-all /pub/git &\n> \n\nYou shouldn't give \"--inetd\" when starting from command line. Do like this:\n\n  sudo git daemon --detach --verbose --export-all --base-path=/pub/git\n\nThen clone dtc-xen.git using the following command:\n\n  git clone git://git.mycompany.com/dtc-xen.git test-git\n\n> \n> 4. At my local machine. I did\n> \n> /home/gyang% git clone git://git.mycompany.com/pub/git/dtc-xen.git test-git\n> \n> Initialized empty Git repository in //home/gyang/test-git/.git/\n> git.mycompany.com[0: 10.66.4.168]: errno=Connection refused\n> fatal: unable to connect a socket (Connection refused)\n> \n> \n> ps -efww | grep git\n> root      9626 22321  0 11:31 pts/1    00:00:00 git-daemon --verbose --inetd --export-all /pub/git\n> \n\nYes, it's waiting for input from stdin, which is what \"--inetd\" does to a\nprocess. Do what I told you above and it'll work just grand.\n\n\nFor further troubleshooting, here are some things to try before asking\nabout git-daemon again:\n\nping git.mycompany.com\n  # should show reasonable response times\n\nnc git.mycompany.com 9418\n  # should give \"connection refused\", or there's a bug somewhere\n\nip=$(host git.mycompany.com | sed -n 's/.*has address //p'); echo $ip\n  # should list the proper ip address\n\nssh root@git.mycompany.com \"ip addr show | grep 'inet $ip'\"\n  # should list one ip-address\n\nssh root@git.mycompany.com \"ps -efww | grep git-daemon\"\n  # should list one process\n\nssh root@git.mycompany.com \"netstat -tpan | grep 0.0.0.0:9418\"\n  # should list the git-daemon\n\nssh root@git.mycompany.com \"grep git-daemon /var/log/messages\"\n  # might show error messages from git-daemon\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"}]}