Git development
 help / color / mirror / Atom feed
* Challenge of setting up git server (repository). Please help!
@ 2008-11-20 21:39 Gary Yang
  2008-11-20 22:04 ` Asheesh Laroia
  2008-11-20 22:13 ` Deskin Miller
  0 siblings, 2 replies; 12+ messages in thread
From: Gary Yang @ 2008-11-20 21:39 UTC (permalink / raw)
  To: git


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.




      

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

* Re: Challenge of setting up git server (repository). Please help!
  2008-11-20 21:39 Challenge of setting up git server (repository). Please help! Gary Yang
@ 2008-11-20 22:04 ` Asheesh Laroia
  2008-11-20 22:13 ` Deskin Miller
  1 sibling, 0 replies; 12+ messages in thread
From: Asheesh Laroia @ 2008-11-20 22:04 UTC (permalink / raw)
  To: Gary Yang; +Cc: git

On Thu, 20 Nov 2008, 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.

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.

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

* Re: Challenge of setting up git server (repository). Please help!
  2008-11-20 21:39 Challenge of setting up git server (repository). Please help! Gary Yang
  2008-11-20 22:04 ` Asheesh Laroia
@ 2008-11-20 22:13 ` Deskin Miller
  2008-11-20 22:43   ` Gary Yang
  1 sibling, 1 reply; 12+ messages in thread
From: Deskin Miller @ 2008-11-20 22:13 UTC (permalink / raw)
  To: Gary Yang; +Cc: git

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

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

* Re: Challenge of setting up git server (repository). Please help!
  2008-11-20 22:13 ` Deskin Miller
@ 2008-11-20 22:43   ` Gary Yang
  2008-11-20 23:08     ` Deskin Miller
  0 siblings, 1 reply; 12+ messages in thread
From: Gary Yang @ 2008-11-20 22:43 UTC (permalink / raw)
  To: Deskin Miller; +Cc: git

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:

> 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


      

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

* Re: Challenge of setting up git server (repository). Please help!
  2008-11-20 22:43   ` Gary Yang
@ 2008-11-20 23:08     ` Deskin Miller
  2008-11-20 23:48       ` Gary Yang
  0 siblings, 1 reply; 12+ messages in thread
From: Deskin Miller @ 2008-11-20 23:08 UTC (permalink / raw)
  To: Gary Yang; +Cc: git

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

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

* Re: Challenge of setting up git server (repository). Please help!
  2008-11-20 23:08     ` Deskin Miller
@ 2008-11-20 23:48       ` Gary Yang
  2008-11-20 23:54         ` Gary Yang
  0 siblings, 1 reply; 12+ messages in thread
From: Gary Yang @ 2008-11-20 23:48 UTC (permalink / raw)
  To: Deskin Miller; +Cc: git


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


      

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

* Re: Challenge of setting up git server (repository). Please help!
  2008-11-20 23:48       ` Gary Yang
@ 2008-11-20 23:54         ` Gary Yang
  2008-11-20 23:59           ` J.H.
  0 siblings, 1 reply; 12+ messages in thread
From: Gary Yang @ 2008-11-20 23:54 UTC (permalink / raw)
  To: Deskin Miller; +Cc: git

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


      

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

* Re: Challenge of setting up git server (repository). Please help!
  2008-11-20 23:54         ` Gary Yang
@ 2008-11-20 23:59           ` J.H.
  2008-11-21  0:12             ` Gary Yang
  0 siblings, 1 reply; 12+ messages in thread
From: J.H. @ 2008-11-20 23:59 UTC (permalink / raw)
  To: garyyang6; +Cc: Deskin Miller, git

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

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

* Re: Challenge of setting up git server (repository). Please help!
  2008-11-20 23:59           ` J.H.
@ 2008-11-21  0:12             ` Gary Yang
  0 siblings, 0 replies; 12+ messages in thread
From: Gary Yang @ 2008-11-21  0:12 UTC (permalink / raw)
  To: J.H.; +Cc: Deskin Miller, git

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:

> 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


      

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

* Re: Challenge of setting up git server (repository). Please help!
@ 2008-11-21  0:14 Gary Yang
  2008-11-21  0:39 ` Gary Yang
  0 siblings, 1 reply; 12+ messages in thread
From: Gary Yang @ 2008-11-21  0:14 UTC (permalink / raw)
  To: J.H.; +Cc: Deskin Miller, git

Kill the process, then

sudo xinetd -stayalive -pidfile /var/run/xinetd.pid

Please let me know if it is correct.  Thanks.


--- 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: "J.H." <warthog19@eaglescrag.net>
> Cc: "Deskin Miller" <deskinm@umich.edu>, git@vger.kernel.org
> Date: Thursday, November 20, 2008, 4:12 PM
> 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:
> 
> > 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


      

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

* Re: Challenge of setting up git server (repository). Please help!
  2008-11-21  0:14 Gary Yang
@ 2008-11-21  0:39 ` Gary Yang
  2008-11-21  7:22   ` Mike Galbraith
  0 siblings, 1 reply; 12+ messages in thread
From: Gary Yang @ 2008-11-21  0:39 UTC (permalink / raw)
  To: J.H.; +Cc: Deskin Miller, git

I killed xinetd. Restarted with sudo xinetd -stayalive -pidfile /var/run/xinetd.pid. 

I back to my private box. I did 

git pull git://git.mycompany.com/pub/git/u-boot.git HEAD

This command hangs for over half hour and is still hanging. Again, below is the content of /etc/xinetd.d/git-daemon. What I did wrong?

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
}

--- 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: "J.H." <warthog19@eaglescrag.net>
> Cc: "Deskin Miller" <deskinm@umich.edu>, git@vger.kernel.org
> Date: Thursday, November 20, 2008, 4:14 PM
> Kill the process, then
> 
> sudo xinetd -stayalive -pidfile /var/run/xinetd.pid
> 
> Please let me know if it is correct.  Thanks.
> 
> 
> --- 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: "J.H." <warthog19@eaglescrag.net>
> > Cc: "Deskin Miller"
> <deskinm@umich.edu>, git@vger.kernel.org
> > Date: Thursday, November 20, 2008, 4:12 PM
> > 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:
> > 
> > > 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
> 
> 
>       
> --
> 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] 12+ messages in thread

* Re: Challenge of setting up git server (repository). Please help!
  2008-11-21  0:39 ` Gary Yang
@ 2008-11-21  7:22   ` Mike Galbraith
  0 siblings, 0 replies; 12+ messages in thread
From: Mike Galbraith @ 2008-11-21  7:22 UTC (permalink / raw)
  To: garyyang6; +Cc: J.H., Deskin Miller, git

On Thu, 2008-11-20 at 16:39 -0800, Gary Yang wrote:
> I killed xinetd. Restarted with sudo xinetd -stayalive -pidfile /var/run/xinetd.pid. 
> 
> I back to my private box. I did 
> 
> git pull git://git.mycompany.com/pub/git/u-boot.git HEAD
> 
> This command hangs for over half hour and is still hanging. Again, below is the content of /etc/xinetd.d/git-daemon. What I did wrong?
> 
> 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
> }

The way I set it up was to create a user 'git' who is my central
repository owner/manager.  All repositories live in ~git.

service git
{
        socket_type     = stream
        protocol        = tcp
        wait            = no
        user            = git
        group           = daemon
        server          = /usr/bin/git
        server_args     = daemon --inetd --export-all --user-path --reuseaddr --detach
        type            = UNLISTED
        port            = 9418
        log_on_failure  += USERID
}

marge:..kernel/linux-2.6.28 # git remote -v
master  git://localhost/~git/linux-2.6

>From host homer, with a hole poked in marge's firewall, works fine.

	-Mike

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

end of thread, other threads:[~2008-11-21  7:23 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-20 21:39 Challenge of setting up git server (repository). Please help! Gary Yang
2008-11-20 22:04 ` Asheesh Laroia
2008-11-20 22:13 ` Deskin Miller
2008-11-20 22:43   ` Gary Yang
2008-11-20 23:08     ` Deskin Miller
2008-11-20 23:48       ` Gary Yang
2008-11-20 23:54         ` Gary Yang
2008-11-20 23:59           ` J.H.
2008-11-21  0:12             ` Gary Yang
  -- strict thread matches above, loose matches on Subject: below --
2008-11-21  0:14 Gary Yang
2008-11-21  0:39 ` Gary Yang
2008-11-21  7:22   ` Mike Galbraith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox