git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Cannot git pull using http from my git.mycompany.com
@ 2008-11-21  1:13 Gary Yang
  2008-11-21  8:43 ` David Symonds
  2008-11-21  9:54 ` Andreas Ericsson
  0 siblings, 2 replies; 6+ messages in thread
From: Gary Yang @ 2008-11-21  1:13 UTC (permalink / raw)
  To: git


git pull http://git.mycompany.com/pub/git/u-boot.git HEAD
fatal: http://git.mycompany.com/pub/git/u-boot.git/info/refs not found: did you run git update-server-info on the server?

Below are related gitweb configs. What did I do wrong?


httpd.confg

<VirtualHost 10.66.4.168>
    ServerName svdcgit01
     DocumentRoot /pub/git
     <Directory /var/www/cgi-bin>
          Allow from all
          AllowOverride all
          Order allow,deny
          Options ExecCGI
          <Files gitweb.cgi>
               SetHandler cgi-script
          </Files>
     </Directory>
     DirectoryIndex /cgi-bin/gitweb.cgi
     SetEnv  GITWEB_CONFIG  /etc/gitweb.conf
#       RewriteEngine on
#       RewriteRule ^/(.*\.git/(?!/?(HEAD|info|objects|refs)).*)?$ /cgi-bin/gitweb.cgi%{REQUEST_URI}  [L,PT]


cat /etc/gitweb.conf
# path to git projects (<project>.git)
$projectroot = "/pub/git";

# directory to use for temp files
$git_temp = "/tmp";

# target of the home link on top of all pages
$home_link = $my_uri;

# html text to include at home page
$home_text = "indextext.html";

# file with project list; by default, simply scan the projectroot dir.
$projects_list = $projectroot;

# stylesheet to use
$stylesheet = "/gitweb/gitweb.css";

# logo to use
#$logo = "/git-logo.png";
$logo = "/gitweb/git-logo.png";

# the 'favicon'
$favicon = "/gitweb/git-favicon.png";

$projects_list_description_width = 60;
#$feature{'pathinfo'}{'default'} = [1];






      

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

* Re: Cannot git pull using http from my git.mycompany.com
  2008-11-21  1:13 Cannot git pull using http from my git.mycompany.com Gary Yang
@ 2008-11-21  8:43 ` David Symonds
  2008-11-21 17:34   ` Gary Yang
  2008-11-21  9:54 ` Andreas Ericsson
  1 sibling, 1 reply; 6+ messages in thread
From: David Symonds @ 2008-11-21  8:43 UTC (permalink / raw)
  To: garyyang6; +Cc: git

On Fri, Nov 21, 2008 at 12:13 PM, Gary Yang <garyyang6@yahoo.com> wrote:

> git pull http://git.mycompany.com/pub/git/u-boot.git HEAD
> fatal: http://git.mycompany.com/pub/git/u-boot.git/info/refs not found: did you run git update-server-info on the server?
>
> Below are related gitweb configs. What did I do wrong?

As the error message asks, did you run git update-server-info on the server?


Dave.

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

* Re: Cannot git pull using http from my git.mycompany.com
  2008-11-21  1:13 Cannot git pull using http from my git.mycompany.com Gary Yang
  2008-11-21  8:43 ` David Symonds
@ 2008-11-21  9:54 ` Andreas Ericsson
  2008-11-21 20:04   ` How to setup a public reposistory? Gary Yang
  1 sibling, 1 reply; 6+ messages in thread
From: Andreas Ericsson @ 2008-11-21  9:54 UTC (permalink / raw)
  To: garyyang6; +Cc: git

Gary Yang wrote:
> git pull http://git.mycompany.com/pub/git/u-boot.git HEAD
> fatal: http://git.mycompany.com/pub/git/u-boot.git/info/refs not found: did you run git update-server-info on the server?
> 
> Below are related gitweb configs. What did I do wrong?
> 
> 
> httpd.confg
> 
> <VirtualHost 10.66.4.168>
>     ServerName svdcgit01
>      DocumentRoot /pub/git
>      <Directory /var/www/cgi-bin>
>           Allow from all
>           AllowOverride all
>           Order allow,deny
>           Options ExecCGI
>           <Files gitweb.cgi>
>                SetHandler cgi-script
>           </Files>
>      </Directory>
>      DirectoryIndex /cgi-bin/gitweb.cgi
>      SetEnv  GITWEB_CONFIG  /etc/gitweb.conf
> #       RewriteEngine on
> #       RewriteRule ^/(.*\.git/(?!/?(HEAD|info|objects|refs)).*)?$ /cgi-bin/gitweb.cgi%{REQUEST_URI}  [L,PT]
> 
> 
> cat /etc/gitweb.conf


You seem slightly confused. gitweb is not used for cloning over http.
The following documents would almost certainly be beneficial for you
to read. Please don't ask any questions that are already answered in
those documents. If, by following the steps outlined in those docs,
you still cannot get things to work, please let us know what you fail
to understand so the texts can be amended.

http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#setting-up-a-public-repository
http://dtcsupport.gplhost.com/Git/Public-Repo-Howto

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

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

* Re: Cannot git pull using http from my git.mycompany.com
  2008-11-21  8:43 ` David Symonds
@ 2008-11-21 17:34   ` Gary Yang
  0 siblings, 0 replies; 6+ messages in thread
From: Gary Yang @ 2008-11-21 17:34 UTC (permalink / raw)
  To: David Symonds; +Cc: git

Yes


--- On Fri, 11/21/08, David Symonds <dsymonds@gmail.com> wrote:

> From: David Symonds <dsymonds@gmail.com>
> Subject: Re: Cannot git pull using http from my git.mycompany.com
> To: garyyang6@yahoo.com
> Cc: git@vger.kernel.org
> Date: Friday, November 21, 2008, 12:43 AM
> On Fri, Nov 21, 2008 at 12:13 PM, Gary Yang
> <garyyang6@yahoo.com> wrote:
> 
> > git pull http://git.mycompany.com/pub/git/u-boot.git
> HEAD
> > fatal:
> http://git.mycompany.com/pub/git/u-boot.git/info/refs not
> found: did you run git update-server-info on the server?
> >
> > Below are related gitweb configs. What did I do wrong?
> 
> As the error message asks, did you run git
> update-server-info on the server?
> 
> 
> Dave.


      

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

* Re: How to setup a public reposistory?
  2008-11-21  9:54 ` Andreas Ericsson
@ 2008-11-21 20:04   ` Gary Yang
  2008-11-22 11:12     ` Andreas Ericsson
  0 siblings, 1 reply; 6+ messages in thread
From: Gary Yang @ 2008-11-21 20:04 UTC (permalink / raw)
  To: Andreas Ericsson; +Cc: git


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.

http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#setting-up-a-public-repository
http://dtcsupport.gplhost.com/Git/Public-Repo-Howto

0. Prepare your name and email address
cat ~gyang/.gitconfig
[user]
        email = gyang@mycompany.com
        name = Gary Yang


1. Create an archive to send to the server

/home/gyang% git clone http://git.gplhost.com/dtc-xen.git

/home/gyang% git clone --bare dtc-xen dtc-xen.git

/home/gyang% touch dtc-xen.git/git-daemon-export-ok

/home/gyang% tar -cvzf dtc-xen.git.tar.gz dtc-xen.git


2. Install the archive on the web server

/pub/git% tar -xvzf /home/gyang/dtc-xen.git.tar.gz

/pub/git/dtc-xen.git% git --bare update-server-info

/pub/git/dtc-xen.git% mv hooks/post-update.sample hooks/post-update

/pub/git/dtc-xen.git% chmod +x hooks/post-update

/pub/git/dtc-xen.git% cat hooks/post-update
#!/bin/sh
#
# An example hook script to prepare a packed repository for use over
# dumb transports.
#
# To enable this hook, rename this file to "post-update".

exec git-update-server-info


3. Configure and start git daemon at the web server

/pub/git/dtc-xen.git% grep 9418 /etc/services
git             9418/tcp                        # Git Version Control System


/pub/git/dtc-xen.git% sudo git daemon --verbose --inetd --export-all /pub/git &


4. At my local machine. I did

/home/gyang% git clone git://git.mycompany.com/pub/git/dtc-xen.git test-git

Initialized empty Git repository in //home/gyang/test-git/.git/
git.mycompany.com[0: 10.66.4.168]: errno=Connection refused
fatal: unable to connect a socket (Connection refused)


ps -efww | grep git
root      9626 22321  0 11:31 pts/1    00:00:00 git-daemon --verbose --inetd --export-all /pub/git





--- On Fri, 11/21/08, Andreas Ericsson <ae@op5.se> wrote:

> From: Andreas Ericsson <ae@op5.se>
> Subject: Re: Cannot git pull using http from my git.mycompany.com
> To: garyyang6@yahoo.com
> Cc: git@vger.kernel.org
> Date: Friday, November 21, 2008, 1:54 AM
> Gary Yang wrote:
> > git pull http://git.mycompany.com/pub/git/u-boot.git
> HEAD
> > fatal:
> http://git.mycompany.com/pub/git/u-boot.git/info/refs not
> found: did you run git update-server-info on the server?
> > 
> > Below are related gitweb configs. What did I do wrong?
> > 
> > 
> > httpd.confg
> > 
> > <VirtualHost 10.66.4.168>
> >     ServerName svdcgit01
> >      DocumentRoot /pub/git
> >      <Directory /var/www/cgi-bin>
> >           Allow from all
> >           AllowOverride all
> >           Order allow,deny
> >           Options ExecCGI
> >           <Files gitweb.cgi>
> >                SetHandler cgi-script
> >           </Files>
> >      </Directory>
> >      DirectoryIndex /cgi-bin/gitweb.cgi
> >      SetEnv  GITWEB_CONFIG  /etc/gitweb.conf
> > #       RewriteEngine on
> > #       RewriteRule
> ^/(.*\.git/(?!/?(HEAD|info|objects|refs)).*)?$
> /cgi-bin/gitweb.cgi%{REQUEST_URI}  [L,PT]
> > 
> > 
> > cat /etc/gitweb.conf
> 
> 
> You seem slightly confused. gitweb is not used for cloning
> over http.
> The following documents would almost certainly be
> beneficial for you
> to read. Please don't ask any questions that are
> already answered in
> those documents. If, by following the steps outlined in
> those docs,
> you still cannot get things to work, please let us know
> what you fail
> to understand so the texts can be amended.
> 
> http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#setting-up-a-public-repository
> http://dtcsupport.gplhost.com/Git/Public-Repo-Howto
> 
> -- Andreas Ericsson                  
> andreas.ericsson@op5.se
> OP5 AB                             www.op5.se
> Tel: +46 8-230225                  Fax: +46 8-230231
> --
> To unsubscribe from this list: send the line
> "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at 
> http://vger.kernel.org/majordomo-info.html


      

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

* Re: How to setup a public reposistory?
  2008-11-21 20:04   ` How to setup a public reposistory? Gary Yang
@ 2008-11-22 11:12     ` Andreas Ericsson
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Ericsson @ 2008-11-22 11:12 UTC (permalink / raw)
  To: garyyang6; +Cc: git

Gary Yang wrote:
> 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.
> 
> http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#setting-up-a-public-repository
> http://dtcsupport.gplhost.com/Git/Public-Repo-Howto
> 
> 0. Prepare your name and email address
> cat ~gyang/.gitconfig
> [user]
>         email = gyang@mycompany.com
>         name = Gary Yang
> 
> 
> 1. Create an archive to send to the server
> 
> /home/gyang% git clone http://git.gplhost.com/dtc-xen.git
> 
> /home/gyang% git clone --bare dtc-xen dtc-xen.git
> 
> /home/gyang% touch dtc-xen.git/git-daemon-export-ok
> 
> /home/gyang% tar -cvzf dtc-xen.git.tar.gz dtc-xen.git
> 
> 
> 2. Install the archive on the web server
> 
> /pub/git% tar -xvzf /home/gyang/dtc-xen.git.tar.gz
> 
> /pub/git/dtc-xen.git% git --bare update-server-info
> 
> /pub/git/dtc-xen.git% mv hooks/post-update.sample hooks/post-update
> 
> /pub/git/dtc-xen.git% chmod +x hooks/post-update
> 
> /pub/git/dtc-xen.git% cat hooks/post-update
> #!/bin/sh
> #
> # An example hook script to prepare a packed repository for use over
> # dumb transports.
> #
> # To enable this hook, rename this file to "post-update".
> 
> exec git-update-server-info
> 
> 
> 3. Configure and start git daemon at the web server
> 
> /pub/git/dtc-xen.git% grep 9418 /etc/services
> git             9418/tcp                        # Git Version Control System
> 
> 
> /pub/git/dtc-xen.git% sudo git daemon --verbose --inetd --export-all /pub/git &
> 

You shouldn't give "--inetd" when starting from command line. Do like this:

  sudo git daemon --detach --verbose --export-all --base-path=/pub/git

Then clone dtc-xen.git using the following command:

  git clone git://git.mycompany.com/dtc-xen.git test-git

> 
> 4. At my local machine. I did
> 
> /home/gyang% git clone git://git.mycompany.com/pub/git/dtc-xen.git test-git
> 
> Initialized empty Git repository in //home/gyang/test-git/.git/
> git.mycompany.com[0: 10.66.4.168]: errno=Connection refused
> fatal: unable to connect a socket (Connection refused)
> 
> 
> ps -efww | grep git
> root      9626 22321  0 11:31 pts/1    00:00:00 git-daemon --verbose --inetd --export-all /pub/git
> 

Yes, it's waiting for input from stdin, which is what "--inetd" does to a
process. Do what I told you above and it'll work just grand.


For further troubleshooting, here are some things to try before asking
about git-daemon again:

ping git.mycompany.com
  # should show reasonable response times

nc git.mycompany.com 9418
  # should give "connection refused", or there's a bug somewhere

ip=$(host git.mycompany.com | sed -n 's/.*has address //p'); echo $ip
  # should list the proper ip address

ssh root@git.mycompany.com "ip addr show | grep 'inet $ip'"
  # should list one ip-address

ssh root@git.mycompany.com "ps -efww | grep git-daemon"
  # should list one process

ssh root@git.mycompany.com "netstat -tpan | grep 0.0.0.0:9418"
  # should list the git-daemon

ssh root@git.mycompany.com "grep git-daemon /var/log/messages"
  # might show error messages from git-daemon

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

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

end of thread, other threads:[~2008-11-22 11:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-21  1:13 Cannot git pull using http from my git.mycompany.com Gary Yang
2008-11-21  8:43 ` David Symonds
2008-11-21 17:34   ` Gary Yang
2008-11-21  9:54 ` Andreas Ericsson
2008-11-21 20:04   ` How to setup a public reposistory? Gary Yang
2008-11-22 11:12     ` Andreas Ericsson

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).