threads / discuss / 16415

Challenge of setting up git server (repository). Please help!

Subject: Challenge of setting up git server (repository). Please help!

## tl;dr

9 messages between Nov 20, 2008 and Nov 21, 2008.

replies: 8people: 4as markdown or json

Gary Yang· Nov 20, 2008, 21:39 UTC · lore

I am working on setting up a git server so that people can clone, pull and push their code at git.mycompany.com/pub/git+project path. However, I am having challenges. For people who setup their git servers, please share your experneces with me and tell me what I did wrong. I greatly appreciate it.

After I made configurations, I ran the command, git update-server-info at the public repository machine. But, I got the error.

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?

The file /pub/git/u-boot.git/info/refs dose exist.

cat /pub/git/u-boot.git/info/refs 87ee4576c4c31b7046fe2bbbdf309eaba5c3f346 refs/heads/master

My question:
Is the contet of /pub/git/u-boot.git/hooks/post-update correct? Should I change "exec git-update-server-info" to "exec git update-server-info"?

cat /pub/git/u-boot.git/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

I tried and changed "exec git-update-server-info" to "exec git update-server-info" in /pub/git/u-boot.git/hooks/post-update. But, I still got same error. 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?

Which one is correct? "exec git-update-server-info" or "exec git update-server-info"? Eventhogh none of them working.
Below are my settings:

grep 9418 /etc/services git 9418/tcp # Git Version Control System

grep git /etc/inetd.conf git stream tcp nowait nobody /usr/local/libexec/git-core/git-daemon git-daemon --inetd --export-all /pub/git

cat /etc/xinetd.d/git-daemon
# default: off
# description: The git server offers access to git repositories
service git
{
        disable = no
        type            = UNLISTED
        port            = 9418
        socket_type     = stream
        wait            = no
        user            = nobody
        server          = /usr/local/libexec/git-core/git-daemon
        server_args     = --inetd --export-all --base-path=/pub/git
        log_on_failure  += USERID
}

I am running git at Linux box: uname -a Linux svdclw004 2.6.9-67.ELsmp #1 SMP Wed Nov 7 13:56:44 EST 2007 x86_64 GNU/Linux

Are there anything wrong? Please let me know.
      
Asheesh Laroia· Nov 20, 2008, 22:04 UTC · re: Gary Yang · lore

Re: Challenge of setting up git server (repository). Please help!

On Thu, 20 Nov 2008, Gary Yang wrote:
Show 5 quoted lines
> I am working on setting up a git server so that people can clone, pull 
> and push their code at git.mycompany.com/pub/git+project path. However, 
> I am having challenges. For people who setup their git servers, please 
> share your experneces with me and tell me what I did wrong. I greatly 
> appreciate it.
Have you tried just using gitosis?  It's very nice.

http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way is what I read to get started.

Keep in mind you can't clone a git repository with no commits.
-- Asheesh.
-- 
You look tired.
Deskin Miller· Nov 20, 2008, 22:13 UTC · re: Gary Yang · lore

Re: Challenge of setting up git server (repository). Please help!

On Thu, Nov 20, 2008 at 01:39:12PM -0800, Gary Yang wrote:
Show 66 quoted lines
> 
> I am working on setting up a git server so that people can clone, pull and push their code at git.mycompany.com/pub/git+project path. 
> However, I am having challenges. For people who setup their git servers, please share your experneces with me and tell me what I did wrong.
> I greatly appreciate it.
> 
> After I made configurations, I ran the command, git update-server-info at the public repository machine. But, I got the error.
> 
> 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?
> 
> The file /pub/git/u-boot.git/info/refs dose exist.
> 
> cat /pub/git/u-boot.git/info/refs
> 87ee4576c4c31b7046fe2bbbdf309eaba5c3f346        refs/heads/master
> 
> My question:
> 
> Is the contet of /pub/git/u-boot.git/hooks/post-update correct? Should I change "exec git-update-server-info" to "exec git update-server-info"?
> 
> cat /pub/git/u-boot.git/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
> 
> I tried and changed "exec git-update-server-info" to "exec git update-server-info" in /pub/git/u-boot.git/hooks/post-update. But, I still got same error.
> 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?
> 
> Which one is correct? "exec git-update-server-info" or "exec git update-server-info"? Eventhogh none of them working.
> 
> Below are my settings:
> 
> grep 9418 /etc/services
> git             9418/tcp                        # Git Version Control System
> 
> 
> grep git /etc/inetd.conf
> git     stream  tcp     nowait  nobody  /usr/local/libexec/git-core/git-daemon git-daemon --inetd --export-all /pub/git
> 
> 
> cat /etc/xinetd.d/git-daemon
> # default: off
> # description: The git server offers access to git repositories
> service git
> {
>         disable = no
>         type            = UNLISTED
>         port            = 9418
>         socket_type     = stream
>         wait            = no
>         user            = nobody
>         server          = /usr/local/libexec/git-core/git-daemon
>         server_args     = --inetd --export-all --base-path=/pub/git
>         log_on_failure  += USERID
> }
> 
> 
> I am running git at Linux box:
> uname -a
> Linux svdclw004 2.6.9-67.ELsmp #1 SMP Wed Nov 7 13:56:44 EST 2007 x86_64 GNU/Linux
> 
> Are there anything wrong? Please let me know.

You tried to fetch from a http url, but your settings make no mention of running a web server. git-update-server-info is only relevant in the context of using a web server to serve git repositories via the same http protocol as is used by web servers everywhere. git-daemon, on the other hand, which is what you show configured here, is used to serve git repositories via a git:// url. Its configuration has no effect on whether using http to fetch a git repository will work or not.

Either use a git:// url to fetch the project, or set up a web server which serves stuff under /pub/git.

I'll also mention that you appear to have configuration for both inetd and xinetd, which are two generally mutually-exclusive 'super-servers'; and furthermore, your configurations are inconsistent in the arguments they pass to git-daemon: it looks like, were you to replace http:// with git://, the inetd config would work as listed, while xinetd would not.

Hope that helps, Deskin Miller

Gary Yang· Nov 20, 2008, 22:43 UTC · re: Deskin Miller · lore

Re: Challenge of setting up git server (repository). Please help!

Deskin,
Many thanks for your explanation. I hope I understand what you said. I deleted /etc/xinetd.d/git-daemon. Then, I tried to git pull. But, I got connection refused. git uses port 9418. Should I request IT Admin to open the port 9418 for me?

git pull git://git.mycompany.com/pub/git/u-boot.git HEAD git.mycompany.com[0: 10.66.4.168]: errno=Connection refused fatal: unable to connect a socket (Connection refused)

Another question, I got no output of "netstat | grep 9418". It means no program runs at port 9418 at the public repository machine. Is it correct?
netstat | grep 9418
--- On Thu, 11/20/08, Deskin Miller <deskinm@umich.edu> wrote:
Show 141 quoted lines
> From: Deskin Miller <deskinm@umich.edu>
> Subject: Re: Challenge of setting up git server (repository). Please help!
> To: "Gary Yang" <garyyang6@yahoo.com>
> Cc: git@vger.kernel.org
> Date: Thursday, November 20, 2008, 2:13 PM
> On Thu, Nov 20, 2008 at 01:39:12PM -0800, Gary Yang wrote:
> > 
> > I am working on setting up a git server so that people
> can clone, pull and push their code at
> git.mycompany.com/pub/git+project path. 
> > However, I am having challenges. For people who setup
> their git servers, please share your experneces with me and
> tell me what I did wrong.
> > I greatly appreciate it.
> > 
> > After I made configurations, I ran the command, git
> update-server-info at the public repository machine. But, I
> got the error.
> > 
> > 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?
> > 
> > The file /pub/git/u-boot.git/info/refs dose exist.
> > 
> > cat /pub/git/u-boot.git/info/refs
> > 87ee4576c4c31b7046fe2bbbdf309eaba5c3f346       
> refs/heads/master
> > 
> > My question:
> > 
> > Is the contet of /pub/git/u-boot.git/hooks/post-update
> correct? Should I change "exec
> git-update-server-info" to "exec git
> update-server-info"?
> > 
> > cat /pub/git/u-boot.git/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
> > 
> > I tried and changed "exec
> git-update-server-info" to "exec git
> update-server-info" in
> /pub/git/u-boot.git/hooks/post-update. But, I still got same
> error.
> > 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?
> > 
> > Which one is correct? "exec
> git-update-server-info" or "exec git
> update-server-info"? Eventhogh none of them working.
> > 
> > Below are my settings:
> > 
> > grep 9418 /etc/services
> > git             9418/tcp                        # Git
> Version Control System
> > 
> > 
> > grep git /etc/inetd.conf
> > git     stream  tcp     nowait  nobody 
> /usr/local/libexec/git-core/git-daemon git-daemon --inetd
> --export-all /pub/git
> > 
> > 
> > cat /etc/xinetd.d/git-daemon
> > # default: off
> > # description: The git server offers access to git
> repositories
> > service git
> > {
> >         disable = no
> >         type            = UNLISTED
> >         port            = 9418
> >         socket_type     = stream
> >         wait            = no
> >         user            = nobody
> >         server          =
> /usr/local/libexec/git-core/git-daemon
> >         server_args     = --inetd --export-all
> --base-path=/pub/git
> >         log_on_failure  += USERID
> > }
> > 
> > 
> > I am running git at Linux box:
> > uname -a
> > Linux svdclw004 2.6.9-67.ELsmp #1 SMP Wed Nov 7
> 13:56:44 EST 2007 x86_64 GNU/Linux
> > 
> > Are there anything wrong? Please let me know.
> 
> You tried to fetch from a http url, but your settings make
> no mention of
> running a web server.  git-update-server-info is only
> relevant in the context
> of using a web server to serve git repositories via the
> same http protocol as
> is used by web servers everywhere.  git-daemon, on the
> other hand, which is
> what you show configured here, is used to serve git
> repositories via a git://
> url.  Its configuration has no effect on whether using http
> to fetch a git
> repository will work or not.
> 
> Either use a git:// url to fetch the project, or set up a
> web server which
> serves stuff under /pub/git.
> 
> I'll also mention that you appear to have configuration
> for both inetd and
> xinetd, which are two generally mutually-exclusive
> 'super-servers'; and
> furthermore, your configurations are inconsistent in the
> arguments they pass to
> git-daemon: it looks like, were you to replace http:// with
> git://, the inetd
> config would work as listed, while xinetd would not.
> 
> Hope that helps,
> Deskin Miller
> 
> --
> 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
Deskin Miller· Nov 20, 2008, 23:08 UTC · re: Gary Yang · lore

Re: Challenge of setting up git server (repository). Please help!

On Thu, Nov 20, 2008 at 02:43:30PM -0800, Gary Yang wrote:
> Many thanks for your explanation. I hope I understand what you said. I deleted /etc/xinetd.d/git-daemon. Then, I tried to git pull. But, I got connection refused. git uses port 9418. Should I request IT Admin to open the port 9418 for me?

You'll need port 9418 open, yes; but since it's an unprivileged port (1024 or higher), you can use it as a regular user and don't need IT intervention unless you have some firewall set up which they need to override for you.

> git pull git://git.mycompany.com/pub/git/u-boot.git HEAD
> git.mycompany.com[0: 10.66.4.168]: errno=Connection refused
> fatal: unable to connect a socket (Connection refused)

It's possible, and likely simpler, to use git-daemon directly, instead of having it be managed by inetd; especially for initial debugging, I'd recommend getting that working before trying to determine if you're having issues with inetd configuration: to do so, just run git-daemon with all the same arguments except for --inetd.

You said you deleted the xinetd config, but that's only relevant if your machine actually uses inetd as its super-server. You should do 'ps -A | grep inetd' (which will match either inetd or xinetd), and see which one is running. If it's inetd, you should be all set, and the issue doesn't look like inetd (assuming you sent it a signal to reload its config file). If on the other hand xinetd is running, you need to use the xinetd config file, and fix the server_args to look like the arguments which exist in the inetd file. Again, you need to signal xinetd at this point to reload its configuration.

Based on the linux kernel version you're reporting, I'm guessing you have some sort of Red Hat based system, which uses xinetd to the best of my knowledge.

> Another question, I got no output of "netstat | grep 9418". It means no program runs at port 9418 at the public repository machine. Is it correct?
> 
> netstat | grep 9418

netstat translates IP addresses to dns names, and ports to service names by default; so, given the line listed in /etc/services, this will show '0.0.0.0:git' or something. Also, it lists established connections, not listening sockets, by default. I'd recommend spending some time with the man page if you're going to use it to debug your setup.

Deskin Miller
Gary Yang· Nov 20, 2008, 23:48 UTC · re: Deskin Miller · lore

Re: Challenge of setting up git server (repository). Please help!

I ran the command,"sudo /usr/local/libexec/git-core/git-daemon git-daemon --export-all /pub/git &" at public repository machine.
At my private machine, I ran, git pull git://svdcgit01.amcc.com/pub/git/u-boot.git HEAD"
I got: "fatal: The remote end hung up unexpectedly"
At the public repository server, I got "'/pub/git/u-boot.git': repository not exported." Any idea of this error?
ps -A | grep inetd
 8874 ?        00:00:00 xinetd
It means it uses xinetd.
I copied git-daemon back to /etc/xinetd.d and added git-daemon to the server_args. See below:
cat /etc/xinetd.d/git-daemon
# default: off
# description: The git server offers access to git repositories
service git
{
        disable = no
        type            = UNLISTED
        port            = 9418
        socket_type     = stream
        wait            = no
        user            = nobody
        server          = /usr/local/libexec/git-core/git-daemon
        server_args     = git-daemon --inetd --export-all --base-path=/pub/git
        log_on_failure  += USERID
}
I kill the daemon "/usr/local/libexec/git-core/git-daemon git-daemon --export-all /pub/git &". 
Back to my private box, and did git pull. I got Connection refused again. what I did wrong?

git pull git://svdcgit01.amcc.com/pub/git/u-boot.git HEAD svdcgit01.amcc.com[0: 10.66.4.168]: errno=Connection refused fatal: unable to connect a socket (Connection refused)

--- On Thu, 11/20/08, Deskin Miller <deskinm@umich.edu> wrote:
Show 73 quoted lines
> From: Deskin Miller <deskinm@umich.edu>
> Subject: Re: Challenge of setting up git server (repository). Please help!
> To: "Gary Yang" <garyyang6@yahoo.com>
> Cc: git@vger.kernel.org
> Date: Thursday, November 20, 2008, 3:08 PM
> On Thu, Nov 20, 2008 at 02:43:30PM -0800, Gary Yang wrote:
> > Many thanks for your explanation. I hope I understand
> what you said. I deleted /etc/xinetd.d/git-daemon. Then, I
> tried to git pull. But, I got connection refused. git uses
> port 9418. Should I request IT Admin to open the port 9418
> for me?
> 
> You'll need port 9418 open, yes; but since it's an
> unprivileged port (1024 or
> higher), you can use it as a regular user and don't
> need IT intervention unless you have some firewall set up
> which they need to override for you.
> 
> > git pull git://git.mycompany.com/pub/git/u-boot.git
> HEAD
> > git.mycompany.com[0: 10.66.4.168]: errno=Connection
> refused
> > fatal: unable to connect a socket (Connection refused)
> 
> It's possible, and likely simpler, to use git-daemon
> directly, instead of
> having it be managed by inetd; especially for initial
> debugging, I'd recommend
> getting that working before trying to determine if
> you're having issues with
> inetd configuration: to do so, just run git-daemon with all
> the same arguments
> except for --inetd.
> 
> You said you deleted the xinetd config, but that's only
> relevant if your
> machine actually uses inetd as its super-server.  You
> should do 'ps -A | grep
> inetd' (which will match either inetd or xinetd), and
> see which one is running.
> If it's inetd, you should be all set, and the issue
> doesn't look like inetd
> (assuming you sent it a signal to reload its config file). 
> If on the other
> hand xinetd is running, you need to use the xinetd config
> file, and fix the
> server_args to look like the arguments which exist in the
> inetd file.  Again,
> you need to signal xinetd at this point to reload its
> configuration.
> 
> Based on the linux kernel version you're reporting,
> I'm guessing you have some
> sort of Red Hat based system, which uses xinetd to the best
> of my knowledge.
> 
> > Another question, I got no output of "netstat |
> grep 9418". It means no program runs at port 9418 at
> the public repository machine. Is it correct?
> > 
> > netstat | grep 9418
> 
> netstat translates IP addresses to dns names, and ports to
> service names by
> default; so, given the line listed in /etc/services, this
> will show
> '0.0.0.0:git' or something.  Also, it lists
> established connections, not
> listening sockets, by default.  I'd recommend spending
> some time with the man
> page if you're going to use it to debug your setup.
> 
> Deskin Miller
Gary Yang· Nov 20, 2008, 23:54 UTC · re: Gary Yang · lore

Re: Challenge of setting up git server (repository). Please help!

Do I need to restart  xinetd after I made changes in /etc/xinetd.d/git-daemon?
--- On Thu, 11/20/08, Gary Yang <garyyang6@yahoo.com> wrote:
Show 177 quoted lines
> From: Gary Yang <garyyang6@yahoo.com>
> Subject: Re: Challenge of setting up git server (repository). Please help!
> To: "Deskin Miller" <deskinm@umich.edu>
> Cc: git@vger.kernel.org
> Date: Thursday, November 20, 2008, 3:48 PM
> I ran the command,"sudo
> /usr/local/libexec/git-core/git-daemon git-daemon
> --export-all /pub/git &" at public repository
> machine.
> 
> At my private machine, I ran, git pull
> git://svdcgit01.amcc.com/pub/git/u-boot.git HEAD"
> 
> I got: "fatal: The remote end hung up
> unexpectedly"
> 
> At the public repository server, I got
> "'/pub/git/u-boot.git': repository not
> exported." Any idea of this error?
> 
> 
> ps -A | grep inetd
>  8874 ?        00:00:00 xinetd
> 
> It means it uses xinetd.
> 
> I copied git-daemon back to /etc/xinetd.d and added
> git-daemon to the server_args. See below:
> 
> cat /etc/xinetd.d/git-daemon
> # default: off
> # description: The git server offers access to git
> repositories
> service git
> {
>         disable = no
>         type            = UNLISTED
>         port            = 9418
>         socket_type     = stream
>         wait            = no
>         user            = nobody
>         server          =
> /usr/local/libexec/git-core/git-daemon
>         server_args     = git-daemon --inetd --export-all
> --base-path=/pub/git
>         log_on_failure  += USERID
> }
> 
> 
> I kill the daemon
> "/usr/local/libexec/git-core/git-daemon git-daemon
> --export-all /pub/git &". 
> 
> Back to my private box, and did git pull. I got Connection
> refused again. what I did wrong?
> 
> git pull git://svdcgit01.amcc.com/pub/git/u-boot.git HEAD
> svdcgit01.amcc.com[0: 10.66.4.168]: errno=Connection
> refused
> fatal: unable to connect a socket (Connection refused)
> 
> 
> 
> 
> --- On Thu, 11/20/08, Deskin Miller
> <deskinm@umich.edu> wrote:
> 
> > From: Deskin Miller <deskinm@umich.edu>
> > Subject: Re: Challenge of setting up git server
> (repository). Please help!
> > To: "Gary Yang" <garyyang6@yahoo.com>
> > Cc: git@vger.kernel.org
> > Date: Thursday, November 20, 2008, 3:08 PM
> > On Thu, Nov 20, 2008 at 02:43:30PM -0800, Gary Yang
> wrote:
> > > Many thanks for your explanation. I hope I
> understand
> > what you said. I deleted /etc/xinetd.d/git-daemon.
> Then, I
> > tried to git pull. But, I got connection refused. git
> uses
> > port 9418. Should I request IT Admin to open the port
> 9418
> > for me?
> > 
> > You'll need port 9418 open, yes; but since
> it's an
> > unprivileged port (1024 or
> > higher), you can use it as a regular user and
> don't
> > need IT intervention unless you have some firewall set
> up
> > which they need to override for you.
> > 
> > > git pull
> git://git.mycompany.com/pub/git/u-boot.git
> > HEAD
> > > git.mycompany.com[0: 10.66.4.168]:
> errno=Connection
> > refused
> > > fatal: unable to connect a socket (Connection
> refused)
> > 
> > It's possible, and likely simpler, to use
> git-daemon
> > directly, instead of
> > having it be managed by inetd; especially for initial
> > debugging, I'd recommend
> > getting that working before trying to determine if
> > you're having issues with
> > inetd configuration: to do so, just run git-daemon
> with all
> > the same arguments
> > except for --inetd.
> > 
> > You said you deleted the xinetd config, but that's
> only
> > relevant if your
> > machine actually uses inetd as its super-server.  You
> > should do 'ps -A | grep
> > inetd' (which will match either inetd or xinetd),
> and
> > see which one is running.
> > If it's inetd, you should be all set, and the
> issue
> > doesn't look like inetd
> > (assuming you sent it a signal to reload its config
> file). 
> > If on the other
> > hand xinetd is running, you need to use the xinetd
> config
> > file, and fix the
> > server_args to look like the arguments which exist in
> the
> > inetd file.  Again,
> > you need to signal xinetd at this point to reload its
> > configuration.
> > 
> > Based on the linux kernel version you're
> reporting,
> > I'm guessing you have some
> > sort of Red Hat based system, which uses xinetd to the
> best
> > of my knowledge.
> > 
> > > Another question, I got no output of
> "netstat |
> > grep 9418". It means no program runs at port 9418
> at
> > the public repository machine. Is it correct?
> > > 
> > > netstat | grep 9418
> > 
> > netstat translates IP addresses to dns names, and
> ports to
> > service names by
> > default; so, given the line listed in /etc/services,
> this
> > will show
> > '0.0.0.0:git' or something.  Also, it lists
> > established connections, not
> > listening sockets, by default.  I'd recommend
> spending
> > some time with the man
> > page if you're going to use it to debug your
> setup.
> > 
> > Deskin Miller
> 
> 
>       
> --
> 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
J.H.· Nov 20, 2008, 23:59 UTC · re: Gary Yang · lore

Re: Challenge of setting up git server (repository). Please help!

Yes.
- John 'Warthog9' Hawley
Chief Kernel.org Administrator
On Thu, 2008-11-20 at 15:54 -0800, Gary Yang wrote:
Show 189 quoted lines
> Do I need to restart  xinetd after I made changes in /etc/xinetd.d/git-daemon?
> 
> 
> --- On Thu, 11/20/08, Gary Yang <garyyang6@yahoo.com> wrote:
> 
> > From: Gary Yang <garyyang6@yahoo.com>
> > Subject: Re: Challenge of setting up git server (repository). Please help!
> > To: "Deskin Miller" <deskinm@umich.edu>
> > Cc: git@vger.kernel.org
> > Date: Thursday, November 20, 2008, 3:48 PM
> > I ran the command,"sudo
> > /usr/local/libexec/git-core/git-daemon git-daemon
> > --export-all /pub/git &" at public repository
> > machine.
> > 
> > At my private machine, I ran, git pull
> > git://svdcgit01.amcc.com/pub/git/u-boot.git HEAD"
> > 
> > I got: "fatal: The remote end hung up
> > unexpectedly"
> > 
> > At the public repository server, I got
> > "'/pub/git/u-boot.git': repository not
> > exported." Any idea of this error?
> > 
> > 
> > ps -A | grep inetd
> >  8874 ?        00:00:00 xinetd
> > 
> > It means it uses xinetd.
> > 
> > I copied git-daemon back to /etc/xinetd.d and added
> > git-daemon to the server_args. See below:
> > 
> > cat /etc/xinetd.d/git-daemon
> > # default: off
> > # description: The git server offers access to git
> > repositories
> > service git
> > {
> >         disable = no
> >         type            = UNLISTED
> >         port            = 9418
> >         socket_type     = stream
> >         wait            = no
> >         user            = nobody
> >         server          =
> > /usr/local/libexec/git-core/git-daemon
> >         server_args     = git-daemon --inetd --export-all
> > --base-path=/pub/git
> >         log_on_failure  += USERID
> > }
> > 
> > 
> > I kill the daemon
> > "/usr/local/libexec/git-core/git-daemon git-daemon
> > --export-all /pub/git &". 
> > 
> > Back to my private box, and did git pull. I got Connection
> > refused again. what I did wrong?
> > 
> > git pull git://svdcgit01.amcc.com/pub/git/u-boot.git HEAD
> > svdcgit01.amcc.com[0: 10.66.4.168]: errno=Connection
> > refused
> > fatal: unable to connect a socket (Connection refused)
> > 
> > 
> > 
> > 
> > --- On Thu, 11/20/08, Deskin Miller
> > <deskinm@umich.edu> wrote:
> > 
> > > From: Deskin Miller <deskinm@umich.edu>
> > > Subject: Re: Challenge of setting up git server
> > (repository). Please help!
> > > To: "Gary Yang" <garyyang6@yahoo.com>
> > > Cc: git@vger.kernel.org
> > > Date: Thursday, November 20, 2008, 3:08 PM
> > > On Thu, Nov 20, 2008 at 02:43:30PM -0800, Gary Yang
> > wrote:
> > > > Many thanks for your explanation. I hope I
> > understand
> > > what you said. I deleted /etc/xinetd.d/git-daemon.
> > Then, I
> > > tried to git pull. But, I got connection refused. git
> > uses
> > > port 9418. Should I request IT Admin to open the port
> > 9418
> > > for me?
> > > 
> > > You'll need port 9418 open, yes; but since
> > it's an
> > > unprivileged port (1024 or
> > > higher), you can use it as a regular user and
> > don't
> > > need IT intervention unless you have some firewall set
> > up
> > > which they need to override for you.
> > > 
> > > > git pull
> > git://git.mycompany.com/pub/git/u-boot.git
> > > HEAD
> > > > git.mycompany.com[0: 10.66.4.168]:
> > errno=Connection
> > > refused
> > > > fatal: unable to connect a socket (Connection
> > refused)
> > > 
> > > It's possible, and likely simpler, to use
> > git-daemon
> > > directly, instead of
> > > having it be managed by inetd; especially for initial
> > > debugging, I'd recommend
> > > getting that working before trying to determine if
> > > you're having issues with
> > > inetd configuration: to do so, just run git-daemon
> > with all
> > > the same arguments
> > > except for --inetd.
> > > 
> > > You said you deleted the xinetd config, but that's
> > only
> > > relevant if your
> > > machine actually uses inetd as its super-server.  You
> > > should do 'ps -A | grep
> > > inetd' (which will match either inetd or xinetd),
> > and
> > > see which one is running.
> > > If it's inetd, you should be all set, and the
> > issue
> > > doesn't look like inetd
> > > (assuming you sent it a signal to reload its config
> > file). 
> > > If on the other
> > > hand xinetd is running, you need to use the xinetd
> > config
> > > file, and fix the
> > > server_args to look like the arguments which exist in
> > the
> > > inetd file.  Again,
> > > you need to signal xinetd at this point to reload its
> > > configuration.
> > > 
> > > Based on the linux kernel version you're
> > reporting,
> > > I'm guessing you have some
> > > sort of Red Hat based system, which uses xinetd to the
> > best
> > > of my knowledge.
> > > 
> > > > Another question, I got no output of
> > "netstat |
> > > grep 9418". It means no program runs at port 9418
> > at
> > > the public repository machine. Is it correct?
> > > > 
> > > > netstat | grep 9418
> > > 
> > > netstat translates IP addresses to dns names, and
> > ports to
> > > service names by
> > > default; so, given the line listed in /etc/services,
> > this
> > > will show
> > > '0.0.0.0:git' or something.  Also, it lists
> > > established connections, not
> > > listening sockets, by default.  I'd recommend
> > spending
> > > some time with the man
> > > page if you're going to use it to debug your
> > setup.
> > > 
> > > Deskin Miller
> > 
> > 
> >       
> > --
> > 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
> 
> 
>       
> --
> 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
Gary Yang· Nov 21, 2008, 00:12 UTC · re: J.H. · lore

Re: Challenge of setting up git server (repository). Please help!

I am not system admin. How to restart it? Can I do this?
sudo xinetd -stayalive -pidfile /var/run/xinetd.pid
Below is the output of current running xinetd

ps -efww | grep xinetd root 8874 1 0 Sep24 ? 00:00:00 xinetd -stayalive -pidfile /var/run/xinetd.pid

Thanks.
--- On Thu, 11/20/08, J.H. <warthog19@eaglescrag.net> wrote:
Show 258 quoted lines
> From: J.H. <warthog19@eaglescrag.net>
> Subject: Re: Challenge of setting up git server (repository). Please help!
> To: garyyang6@yahoo.com
> Cc: "Deskin Miller" <deskinm@umich.edu>, git@vger.kernel.org
> Date: Thursday, November 20, 2008, 3:59 PM
> Yes.
> 
> - John 'Warthog9' Hawley
> Chief Kernel.org Administrator
> 
> 
> On Thu, 2008-11-20 at 15:54 -0800, Gary Yang wrote:
> > Do I need to restart  xinetd after I made changes in
> /etc/xinetd.d/git-daemon?
> > 
> > 
> > --- On Thu, 11/20/08, Gary Yang
> <garyyang6@yahoo.com> wrote:
> > 
> > > From: Gary Yang <garyyang6@yahoo.com>
> > > Subject: Re: Challenge of setting up git server
> (repository). Please help!
> > > To: "Deskin Miller"
> <deskinm@umich.edu>
> > > Cc: git@vger.kernel.org
> > > Date: Thursday, November 20, 2008, 3:48 PM
> > > I ran the command,"sudo
> > > /usr/local/libexec/git-core/git-daemon git-daemon
> > > --export-all /pub/git &" at public
> repository
> > > machine.
> > > 
> > > At my private machine, I ran, git pull
> > > git://svdcgit01.amcc.com/pub/git/u-boot.git
> HEAD"
> > > 
> > > I got: "fatal: The remote end hung up
> > > unexpectedly"
> > > 
> > > At the public repository server, I got
> > > "'/pub/git/u-boot.git': repository
> not
> > > exported." Any idea of this error?
> > > 
> > > 
> > > ps -A | grep inetd
> > >  8874 ?        00:00:00 xinetd
> > > 
> > > It means it uses xinetd.
> > > 
> > > I copied git-daemon back to /etc/xinetd.d and
> added
> > > git-daemon to the server_args. See below:
> > > 
> > > cat /etc/xinetd.d/git-daemon
> > > # default: off
> > > # description: The git server offers access to
> git
> > > repositories
> > > service git
> > > {
> > >         disable = no
> > >         type            = UNLISTED
> > >         port            = 9418
> > >         socket_type     = stream
> > >         wait            = no
> > >         user            = nobody
> > >         server          =
> > > /usr/local/libexec/git-core/git-daemon
> > >         server_args     = git-daemon --inetd
> --export-all
> > > --base-path=/pub/git
> > >         log_on_failure  += USERID
> > > }
> > > 
> > > 
> > > I kill the daemon
> > > "/usr/local/libexec/git-core/git-daemon
> git-daemon
> > > --export-all /pub/git &". 
> > > 
> > > Back to my private box, and did git pull. I got
> Connection
> > > refused again. what I did wrong?
> > > 
> > > git pull
> git://svdcgit01.amcc.com/pub/git/u-boot.git HEAD
> > > svdcgit01.amcc.com[0: 10.66.4.168]:
> errno=Connection
> > > refused
> > > fatal: unable to connect a socket (Connection
> refused)
> > > 
> > > 
> > > 
> > > 
> > > --- On Thu, 11/20/08, Deskin Miller
> > > <deskinm@umich.edu> wrote:
> > > 
> > > > From: Deskin Miller
> <deskinm@umich.edu>
> > > > Subject: Re: Challenge of setting up git
> server
> > > (repository). Please help!
> > > > To: "Gary Yang"
> <garyyang6@yahoo.com>
> > > > Cc: git@vger.kernel.org
> > > > Date: Thursday, November 20, 2008, 3:08 PM
> > > > On Thu, Nov 20, 2008 at 02:43:30PM -0800,
> Gary Yang
> > > wrote:
> > > > > Many thanks for your explanation. I
> hope I
> > > understand
> > > > what you said. I deleted
> /etc/xinetd.d/git-daemon.
> > > Then, I
> > > > tried to git pull. But, I got connection
> refused. git
> > > uses
> > > > port 9418. Should I request IT Admin to open
> the port
> > > 9418
> > > > for me?
> > > > 
> > > > You'll need port 9418 open, yes; but
> since
> > > it's an
> > > > unprivileged port (1024 or
> > > > higher), you can use it as a regular user
> and
> > > don't
> > > > need IT intervention unless you have some
> firewall set
> > > up
> > > > which they need to override for you.
> > > > 
> > > > > git pull
> > > git://git.mycompany.com/pub/git/u-boot.git
> > > > HEAD
> > > > > git.mycompany.com[0: 10.66.4.168]:
> > > errno=Connection
> > > > refused
> > > > > fatal: unable to connect a socket
> (Connection
> > > refused)
> > > > 
> > > > It's possible, and likely simpler, to
> use
> > > git-daemon
> > > > directly, instead of
> > > > having it be managed by inetd; especially
> for initial
> > > > debugging, I'd recommend
> > > > getting that working before trying to
> determine if
> > > > you're having issues with
> > > > inetd configuration: to do so, just run
> git-daemon
> > > with all
> > > > the same arguments
> > > > except for --inetd.
> > > > 
> > > > You said you deleted the xinetd config, but
> that's
> > > only
> > > > relevant if your
> > > > machine actually uses inetd as its
> super-server.  You
> > > > should do 'ps -A | grep
> > > > inetd' (which will match either inetd or
> xinetd),
> > > and
> > > > see which one is running.
> > > > If it's inetd, you should be all set,
> and the
> > > issue
> > > > doesn't look like inetd
> > > > (assuming you sent it a signal to reload its
> config
> > > file). 
> > > > If on the other
> > > > hand xinetd is running, you need to use the
> xinetd
> > > config
> > > > file, and fix the
> > > > server_args to look like the arguments which
> exist in
> > > the
> > > > inetd file.  Again,
> > > > you need to signal xinetd at this point to
> reload its
> > > > configuration.
> > > > 
> > > > Based on the linux kernel version you're
> > > reporting,
> > > > I'm guessing you have some
> > > > sort of Red Hat based system, which uses
> xinetd to the
> > > best
> > > > of my knowledge.
> > > > 
> > > > > Another question, I got no output of
> > > "netstat |
> > > > grep 9418". It means no program runs at
> port 9418
> > > at
> > > > the public repository machine. Is it
> correct?
> > > > > 
> > > > > netstat | grep 9418
> > > > 
> > > > netstat translates IP addresses to dns
> names, and
> > > ports to
> > > > service names by
> > > > default; so, given the line listed in
> /etc/services,
> > > this
> > > > will show
> > > > '0.0.0.0:git' or something.  Also,
> it lists
> > > > established connections, not
> > > > listening sockets, by default.  I'd
> recommend
> > > spending
> > > > some time with the man
> > > > page if you're going to use it to debug
> your
> > > setup.
> > > > 
> > > > Deskin Miller
> > > 
> > > 
> > >       
> > > --
> > > 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
> > 
> > 
> >       
> > --
> > 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
> 
> --
> 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

← back to recent threads