{"thread":{"id":"16415","subject":"Challenge of setting up git server (repository). Please help!","startedAt":"2008-11-20T21:39:12Z","lastAt":"2008-11-21T00:12:38Z","messageCount":9,"participants":["Gary Yang","Deskin Miller","Asheesh Laroia","J.H."],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"96284","messageId":"829533.97868.qm@web37906.mail.mud.yahoo.com","threadId":"16415","inReplyTo":null,"subject":"Challenge of setting up git server (repository). Please help!","fromName":"Gary Yang","fromEmail":"garyyang6@yahoo.com","sentAt":"2008-11-20T21:39:12Z","receivedAt":"2008-11-20T21:39:12Z","isPatch":false,"sender":{"key":"garyyang6@yahoo.com","avatar":null},"body":"\nI 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. \nHowever, I am having challenges. For people who setup their git servers, please share your experneces with me and tell me what I did wrong.\nI greatly appreciate it.\n\nAfter I made configurations, I ran the command, git update-server-info at the public repository machine. But, I got the error.\n\ngit pull http://git.mycompany.com/pub/git/u-boot.git HEAD\nfatal: http://git.mycompany.com/pub/git/u-boot.git/info/refs not found: did you run git update-server-info on the server?\n\nThe file /pub/git/u-boot.git/info/refs dose exist.\n\ncat /pub/git/u-boot.git/info/refs\n87ee4576c4c31b7046fe2bbbdf309eaba5c3f346        refs/heads/master\n\nMy question:\n\nIs 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\"?\n\ncat /pub/git/u-boot.git/hooks/post-update\n#!/bin/sh\n#\n# An example hook script to prepare a packed repository for use over\n# dumb transports.\n#\n# To enable this hook, rename this file to \"post-update\".\nexec git-update-server-info\n\nI 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.\ngit pull http://git.mycompany.com/pub/git/u-boot.git HEAD\nfatal: http://git.mycompany.com/pub/git/u-boot.git/info/refs not found: did you run git update-server-info on the server?\n\nWhich one is correct? \"exec git-update-server-info\" or \"exec git update-server-info\"? Eventhogh none of them working.\n\nBelow are my settings:\n\ngrep 9418 /etc/services\ngit             9418/tcp                        # Git Version Control System\n\n\ngrep git /etc/inetd.conf\ngit     stream  tcp     nowait  nobody  /usr/local/libexec/git-core/git-daemon git-daemon --inetd --export-all /pub/git\n\n\ncat /etc/xinetd.d/git-daemon\n# default: off\n# description: The git server offers access to git repositories\nservice git\n{\n        disable = no\n        type            = UNLISTED\n        port            = 9418\n        socket_type     = stream\n        wait            = no\n        user            = nobody\n        server          = /usr/local/libexec/git-core/git-daemon\n        server_args     = --inetd --export-all --base-path=/pub/git\n        log_on_failure  += USERID\n}\n\n\nI am running git at Linux box:\nuname -a\nLinux svdclw004 2.6.9-67.ELsmp #1 SMP Wed Nov 7 13:56:44 EST 2007 x86_64 GNU/Linux\n\nAre there anything wrong? Please let me know.\n\n\n\n\n      \n"},{"id":"96287","messageId":"alpine.DEB.2.00.0811201400200.30495@vellum.laroia.net","threadId":"16415","inReplyTo":"829533.97868.qm@web37906.mail.mud.yahoo.com","subject":"Re: Challenge of setting up git server (repository). Please help!","fromName":"Asheesh Laroia","fromEmail":"asheesh@asheesh.org","sentAt":"2008-11-20T22:04:04Z","receivedAt":"2008-11-20T22:04:04Z","isPatch":false,"sender":{"key":"asheesh@asheesh.org","avatar":"https://avatars.githubusercontent.com/u/25457?v=4"},"body":"On Thu, 20 Nov 2008, Gary Yang wrote:\n\n> I am working on setting up a git server so that people can clone, pull \n> and push their code at git.mycompany.com/pub/git+project path. However, \n> I am having challenges. For people who setup their git servers, please \n> share your experneces with me and tell me what I did wrong. I greatly \n> appreciate it.\n\nHave you tried just using gitosis?  It's very nice.\n\nhttp://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way \nis what I read to get started.\n\nKeep in mind you can't clone a git repository with no commits.\n\n-- Asheesh.\n\n-- \nYou look tired.\n"},{"id":"96285","messageId":"20081120221321.GA6349@euler","threadId":"16415","inReplyTo":"829533.97868.qm@web37906.mail.mud.yahoo.com","subject":"Re: Challenge of setting up git server (repository). Please help!","fromName":"Deskin Miller","fromEmail":"deskinm@umich.edu","sentAt":"2008-11-20T22:13:21Z","receivedAt":"2008-11-20T22:13:21Z","isPatch":false,"sender":{"key":"deskinm@umich.edu","avatar":"https://gravatar.com/avatar/d340a0e612cdf0a79535c71863c0b4c535e9aba63b42032226ae903e638b64f9?d=mp&s=160"},"body":"On Thu, Nov 20, 2008 at 01:39:12PM -0800, Gary Yang wrote:\n> \n> 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. \n> 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.\n> I greatly appreciate it.\n> \n> After I made configurations, I ran the command, git update-server-info at the public repository machine. But, I got the error.\n> \n> git pull http://git.mycompany.com/pub/git/u-boot.git HEAD\n> fatal: http://git.mycompany.com/pub/git/u-boot.git/info/refs not found: did you run git update-server-info on the server?\n> \n> The file /pub/git/u-boot.git/info/refs dose exist.\n> \n> cat /pub/git/u-boot.git/info/refs\n> 87ee4576c4c31b7046fe2bbbdf309eaba5c3f346        refs/heads/master\n> \n> My question:\n> \n> 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\"?\n> \n> cat /pub/git/u-boot.git/hooks/post-update\n> #!/bin/sh\n> #\n> # An example hook script to prepare a packed repository for use over\n> # dumb transports.\n> #\n> # To enable this hook, rename this file to \"post-update\".\n> exec git-update-server-info\n> \n> 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.\n> git pull http://git.mycompany.com/pub/git/u-boot.git HEAD\n> fatal: http://git.mycompany.com/pub/git/u-boot.git/info/refs not found: did you run git update-server-info on the server?\n> \n> Which one is correct? \"exec git-update-server-info\" or \"exec git update-server-info\"? Eventhogh none of them working.\n> \n> Below are my settings:\n> \n> grep 9418 /etc/services\n> git             9418/tcp                        # Git Version Control System\n> \n> \n> grep git /etc/inetd.conf\n> git     stream  tcp     nowait  nobody  /usr/local/libexec/git-core/git-daemon git-daemon --inetd --export-all /pub/git\n> \n> \n> cat /etc/xinetd.d/git-daemon\n> # default: off\n> # description: The git server offers access to git repositories\n> service git\n> {\n>         disable = no\n>         type            = UNLISTED\n>         port            = 9418\n>         socket_type     = stream\n>         wait            = no\n>         user            = nobody\n>         server          = /usr/local/libexec/git-core/git-daemon\n>         server_args     = --inetd --export-all --base-path=/pub/git\n>         log_on_failure  += USERID\n> }\n> \n> \n> I am running git at Linux box:\n> uname -a\n> Linux svdclw004 2.6.9-67.ELsmp #1 SMP Wed Nov 7 13:56:44 EST 2007 x86_64 GNU/Linux\n> \n> Are there anything wrong? Please let me know.\n\nYou tried to fetch from a http url, but your settings make no mention of\nrunning a web server.  git-update-server-info is only relevant in the context\nof using a web server to serve git repositories via the same http protocol as\nis used by web servers everywhere.  git-daemon, on the other hand, which is\nwhat you show configured here, is used to serve git repositories via a git://\nurl.  Its configuration has no effect on whether using http to fetch a git\nrepository will work or not.\n\nEither use a git:// url to fetch the project, or set up a web server which\nserves stuff under /pub/git.\n\nI'll also mention that you appear to have configuration for both inetd and\nxinetd, which are two generally mutually-exclusive 'super-servers'; and\nfurthermore, your configurations are inconsistent in the arguments they pass to\ngit-daemon: it looks like, were you to replace http:// with git://, the inetd\nconfig would work as listed, while xinetd would not.\n\nHope that helps,\nDeskin Miller\n"},{"id":"96288","messageId":"146002.93100.qm@web37908.mail.mud.yahoo.com","threadId":"16415","inReplyTo":"20081120221321.GA6349@euler","subject":"Re: Challenge of setting up git server (repository). Please help!","fromName":"Gary Yang","fromEmail":"garyyang6@yahoo.com","sentAt":"2008-11-20T22:43:30Z","receivedAt":"2008-11-20T22:43:30Z","isPatch":false,"sender":{"key":"garyyang6@yahoo.com","avatar":null},"body":"Deskin,\n\nMany 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?\n\ngit pull git://git.mycompany.com/pub/git/u-boot.git HEAD\ngit.mycompany.com[0: 10.66.4.168]: errno=Connection refused\nfatal: unable to connect a socket (Connection refused)\n\nAnother 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?\n\nnetstat | grep 9418\n\n\n--- On Thu, 11/20/08, Deskin Miller <deskinm@umich.edu> wrote:\n\n> From: Deskin Miller <deskinm@umich.edu>\n> Subject: Re: Challenge of setting up git server (repository). Please help!\n> To: \"Gary Yang\" <garyyang6@yahoo.com>\n> Cc: git@vger.kernel.org\n> Date: Thursday, November 20, 2008, 2:13 PM\n> On Thu, Nov 20, 2008 at 01:39:12PM -0800, Gary Yang wrote:\n> > \n> > I am working on setting up a git server so that people\n> can clone, pull and push their code at\n> git.mycompany.com/pub/git+project path. \n> > However, I am having challenges. For people who setup\n> their git servers, please share your experneces with me and\n> tell me what I did wrong.\n> > I greatly appreciate it.\n> > \n> > After I made configurations, I ran the command, git\n> update-server-info at the public repository machine. But, I\n> got the error.\n> > \n> > git pull http://git.mycompany.com/pub/git/u-boot.git\n> HEAD\n> > fatal:\n> http://git.mycompany.com/pub/git/u-boot.git/info/refs not\n> found: did you run git update-server-info on the server?\n> > \n> > The file /pub/git/u-boot.git/info/refs dose exist.\n> > \n> > cat /pub/git/u-boot.git/info/refs\n> > 87ee4576c4c31b7046fe2bbbdf309eaba5c3f346       \n> refs/heads/master\n> > \n> > My question:\n> > \n> > Is the contet of /pub/git/u-boot.git/hooks/post-update\n> correct? Should I change \"exec\n> git-update-server-info\" to \"exec git\n> update-server-info\"?\n> > \n> > cat /pub/git/u-boot.git/hooks/post-update\n> > #!/bin/sh\n> > #\n> > # An example hook script to prepare a packed\n> repository for use over\n> > # dumb transports.\n> > #\n> > # To enable this hook, rename this file to\n> \"post-update\".\n> > exec git-update-server-info\n> > \n> > I tried and changed \"exec\n> git-update-server-info\" to \"exec git\n> update-server-info\" in\n> /pub/git/u-boot.git/hooks/post-update. But, I still got same\n> error.\n> > git pull http://git.mycompany.com/pub/git/u-boot.git\n> HEAD\n> > fatal:\n> http://git.mycompany.com/pub/git/u-boot.git/info/refs not\n> found: did you run git update-server-info on the server?\n> > \n> > Which one is correct? \"exec\n> git-update-server-info\" or \"exec git\n> update-server-info\"? Eventhogh none of them working.\n> > \n> > Below are my settings:\n> > \n> > grep 9418 /etc/services\n> > git             9418/tcp                        # Git\n> Version Control System\n> > \n> > \n> > grep git /etc/inetd.conf\n> > git     stream  tcp     nowait  nobody \n> /usr/local/libexec/git-core/git-daemon git-daemon --inetd\n> --export-all /pub/git\n> > \n> > \n> > cat /etc/xinetd.d/git-daemon\n> > # default: off\n> > # description: The git server offers access to git\n> repositories\n> > service git\n> > {\n> >         disable = no\n> >         type            = UNLISTED\n> >         port            = 9418\n> >         socket_type     = stream\n> >         wait            = no\n> >         user            = nobody\n> >         server          =\n> /usr/local/libexec/git-core/git-daemon\n> >         server_args     = --inetd --export-all\n> --base-path=/pub/git\n> >         log_on_failure  += USERID\n> > }\n> > \n> > \n> > I am running git at Linux box:\n> > uname -a\n> > Linux svdclw004 2.6.9-67.ELsmp #1 SMP Wed Nov 7\n> 13:56:44 EST 2007 x86_64 GNU/Linux\n> > \n> > Are there anything wrong? Please let me know.\n> \n> You tried to fetch from a http url, but your settings make\n> no mention of\n> running a web server.  git-update-server-info is only\n> relevant in the context\n> of using a web server to serve git repositories via the\n> same http protocol as\n> is used by web servers everywhere.  git-daemon, on the\n> other hand, which is\n> what you show configured here, is used to serve git\n> repositories via a git://\n> url.  Its configuration has no effect on whether using http\n> to fetch a git\n> repository will work or not.\n> \n> Either use a git:// url to fetch the project, or set up a\n> web server which\n> serves stuff under /pub/git.\n> \n> I'll also mention that you appear to have configuration\n> for both inetd and\n> xinetd, which are two generally mutually-exclusive\n> 'super-servers'; and\n> furthermore, your configurations are inconsistent in the\n> arguments they pass to\n> git-daemon: it looks like, were you to replace http:// with\n> git://, the inetd\n> config would work as listed, while xinetd would not.\n> \n> Hope that helps,\n> Deskin Miller\n> \n> --\n> To unsubscribe from this list: send the line\n> \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at \n> http://vger.kernel.org/majordomo-info.html\n\n\n      \n"},{"id":"96289","messageId":"20081120230859.GA13683@euler","threadId":"16415","inReplyTo":"146002.93100.qm@web37908.mail.mud.yahoo.com","subject":"Re: Challenge of setting up git server (repository). Please help!","fromName":"Deskin Miller","fromEmail":"deskinm@umich.edu","sentAt":"2008-11-20T23:08:59Z","receivedAt":"2008-11-20T23:08:59Z","isPatch":false,"sender":{"key":"deskinm@umich.edu","avatar":"https://gravatar.com/avatar/d340a0e612cdf0a79535c71863c0b4c535e9aba63b42032226ae903e638b64f9?d=mp&s=160"},"body":"On Thu, Nov 20, 2008 at 02:43:30PM -0800, Gary Yang wrote:\n> 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?\n\nYou'll need port 9418 open, yes; but since it's an unprivileged port (1024 or\nhigher), 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.\n\n> git pull git://git.mycompany.com/pub/git/u-boot.git HEAD\n> git.mycompany.com[0: 10.66.4.168]: errno=Connection refused\n> fatal: unable to connect a socket (Connection refused)\n\nIt's possible, and likely simpler, to use git-daemon directly, instead of\nhaving it be managed by inetd; especially for initial debugging, I'd recommend\ngetting that working before trying to determine if you're having issues with\ninetd configuration: to do so, just run git-daemon with all the same arguments\nexcept for --inetd.\n\nYou said you deleted the xinetd config, but that's only relevant if your\nmachine actually uses inetd as its super-server.  You should do 'ps -A | grep\ninetd' (which will match either inetd or xinetd), and see which one is running.\nIf it's inetd, you should be all set, and the issue doesn't look like inetd\n(assuming you sent it a signal to reload its config file).  If on the other\nhand xinetd is running, you need to use the xinetd config file, and fix the\nserver_args to look like the arguments which exist in the inetd file.  Again,\nyou need to signal xinetd at this point to reload its configuration.\n\nBased on the linux kernel version you're reporting, I'm guessing you have some\nsort of Red Hat based system, which uses xinetd to the best of my knowledge.\n\n> 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?\n> \n> netstat | grep 9418\n\nnetstat translates IP addresses to dns names, and ports to service names by\ndefault; so, given the line listed in /etc/services, this will show\n'0.0.0.0:git' or something.  Also, it lists established connections, not\nlistening sockets, by default.  I'd recommend spending some time with the man\npage if you're going to use it to debug your setup.\n\nDeskin Miller\n"},{"id":"96290","messageId":"692201.86102.qm@web37905.mail.mud.yahoo.com","threadId":"16415","inReplyTo":"20081120230859.GA13683@euler","subject":"Re: Challenge of setting up git server (repository). Please help!","fromName":"Gary Yang","fromEmail":"garyyang6@yahoo.com","sentAt":"2008-11-20T23:48:08Z","receivedAt":"2008-11-20T23:48:08Z","isPatch":false,"sender":{"key":"garyyang6@yahoo.com","avatar":null},"body":"\nI ran the command,\"sudo /usr/local/libexec/git-core/git-daemon git-daemon --export-all /pub/git &\" at public repository machine.\n\nAt my private machine, I ran, git pull git://svdcgit01.amcc.com/pub/git/u-boot.git HEAD\"\n\nI got: \"fatal: The remote end hung up unexpectedly\"\n\nAt the public repository server, I got \"'/pub/git/u-boot.git': repository not exported.\" Any idea of this error?\n\n\nps -A | grep inetd\n 8874 ?        00:00:00 xinetd\n\nIt means it uses xinetd.\n\nI copied git-daemon back to /etc/xinetd.d and added git-daemon to the server_args. See below:\n\ncat /etc/xinetd.d/git-daemon\n# default: off\n# description: The git server offers access to git repositories\nservice git\n{\n        disable = no\n        type            = UNLISTED\n        port            = 9418\n        socket_type     = stream\n        wait            = no\n        user            = nobody\n        server          = /usr/local/libexec/git-core/git-daemon\n        server_args     = git-daemon --inetd --export-all --base-path=/pub/git\n        log_on_failure  += USERID\n}\n\n\nI kill the daemon \"/usr/local/libexec/git-core/git-daemon git-daemon --export-all /pub/git &\". \n\nBack to my private box, and did git pull. I got Connection refused again. what I did wrong?\n\ngit pull git://svdcgit01.amcc.com/pub/git/u-boot.git HEAD\nsvdcgit01.amcc.com[0: 10.66.4.168]: errno=Connection refused\nfatal: unable to connect a socket (Connection refused)\n\n\n\n\n--- On Thu, 11/20/08, Deskin Miller <deskinm@umich.edu> wrote:\n\n> From: Deskin Miller <deskinm@umich.edu>\n> Subject: Re: Challenge of setting up git server (repository). Please help!\n> To: \"Gary Yang\" <garyyang6@yahoo.com>\n> Cc: git@vger.kernel.org\n> Date: Thursday, November 20, 2008, 3:08 PM\n> On Thu, Nov 20, 2008 at 02:43:30PM -0800, Gary Yang wrote:\n> > Many thanks for your explanation. I hope I understand\n> what you said. I deleted /etc/xinetd.d/git-daemon. Then, I\n> tried to git pull. But, I got connection refused. git uses\n> port 9418. Should I request IT Admin to open the port 9418\n> for me?\n> \n> You'll need port 9418 open, yes; but since it's an\n> unprivileged port (1024 or\n> higher), you can use it as a regular user and don't\n> need IT intervention unless you have some firewall set up\n> which they need to override for you.\n> \n> > git pull git://git.mycompany.com/pub/git/u-boot.git\n> HEAD\n> > git.mycompany.com[0: 10.66.4.168]: errno=Connection\n> refused\n> > fatal: unable to connect a socket (Connection refused)\n> \n> It's possible, and likely simpler, to use git-daemon\n> directly, instead of\n> having it be managed by inetd; especially for initial\n> debugging, I'd recommend\n> getting that working before trying to determine if\n> you're having issues with\n> inetd configuration: to do so, just run git-daemon with all\n> the same arguments\n> except for --inetd.\n> \n> You said you deleted the xinetd config, but that's only\n> relevant if your\n> machine actually uses inetd as its super-server.  You\n> should do 'ps -A | grep\n> inetd' (which will match either inetd or xinetd), and\n> see which one is running.\n> If it's inetd, you should be all set, and the issue\n> doesn't look like inetd\n> (assuming you sent it a signal to reload its config file). \n> If on the other\n> hand xinetd is running, you need to use the xinetd config\n> file, and fix the\n> server_args to look like the arguments which exist in the\n> inetd file.  Again,\n> you need to signal xinetd at this point to reload its\n> configuration.\n> \n> Based on the linux kernel version you're reporting,\n> I'm guessing you have some\n> sort of Red Hat based system, which uses xinetd to the best\n> of my knowledge.\n> \n> > Another question, I got no output of \"netstat |\n> grep 9418\". It means no program runs at port 9418 at\n> the public repository machine. Is it correct?\n> > \n> > netstat | grep 9418\n> \n> netstat translates IP addresses to dns names, and ports to\n> service names by\n> default; so, given the line listed in /etc/services, this\n> will show\n> '0.0.0.0:git' or something.  Also, it lists\n> established connections, not\n> listening sockets, by default.  I'd recommend spending\n> some time with the man\n> page if you're going to use it to debug your setup.\n> \n> Deskin Miller\n\n\n      \n"},{"id":"96291","messageId":"636576.92732.qm@web37905.mail.mud.yahoo.com","threadId":"16415","inReplyTo":"692201.86102.qm@web37905.mail.mud.yahoo.com","subject":"Re: Challenge of setting up git server (repository). Please help!","fromName":"Gary Yang","fromEmail":"garyyang6@yahoo.com","sentAt":"2008-11-20T23:54:41Z","receivedAt":"2008-11-20T23:54:41Z","isPatch":false,"sender":{"key":"garyyang6@yahoo.com","avatar":null},"body":"Do I need to restart  xinetd after I made changes in /etc/xinetd.d/git-daemon?\n\n\n--- On Thu, 11/20/08, Gary Yang <garyyang6@yahoo.com> wrote:\n\n> From: Gary Yang <garyyang6@yahoo.com>\n> Subject: Re: Challenge of setting up git server (repository). Please help!\n> To: \"Deskin Miller\" <deskinm@umich.edu>\n> Cc: git@vger.kernel.org\n> Date: Thursday, November 20, 2008, 3:48 PM\n> I ran the command,\"sudo\n> /usr/local/libexec/git-core/git-daemon git-daemon\n> --export-all /pub/git &\" at public repository\n> machine.\n> \n> At my private machine, I ran, git pull\n> git://svdcgit01.amcc.com/pub/git/u-boot.git HEAD\"\n> \n> I got: \"fatal: The remote end hung up\n> unexpectedly\"\n> \n> At the public repository server, I got\n> \"'/pub/git/u-boot.git': repository not\n> exported.\" Any idea of this error?\n> \n> \n> ps -A | grep inetd\n>  8874 ?        00:00:00 xinetd\n> \n> It means it uses xinetd.\n> \n> I copied git-daemon back to /etc/xinetd.d and added\n> git-daemon to the server_args. See below:\n> \n> cat /etc/xinetd.d/git-daemon\n> # default: off\n> # description: The git server offers access to git\n> repositories\n> service git\n> {\n>         disable = no\n>         type            = UNLISTED\n>         port            = 9418\n>         socket_type     = stream\n>         wait            = no\n>         user            = nobody\n>         server          =\n> /usr/local/libexec/git-core/git-daemon\n>         server_args     = git-daemon --inetd --export-all\n> --base-path=/pub/git\n>         log_on_failure  += USERID\n> }\n> \n> \n> I kill the daemon\n> \"/usr/local/libexec/git-core/git-daemon git-daemon\n> --export-all /pub/git &\". \n> \n> Back to my private box, and did git pull. I got Connection\n> refused again. what I did wrong?\n> \n> git pull git://svdcgit01.amcc.com/pub/git/u-boot.git HEAD\n> svdcgit01.amcc.com[0: 10.66.4.168]: errno=Connection\n> refused\n> fatal: unable to connect a socket (Connection refused)\n> \n> \n> \n> \n> --- On Thu, 11/20/08, Deskin Miller\n> <deskinm@umich.edu> wrote:\n> \n> > From: Deskin Miller <deskinm@umich.edu>\n> > Subject: Re: Challenge of setting up git server\n> (repository). Please help!\n> > To: \"Gary Yang\" <garyyang6@yahoo.com>\n> > Cc: git@vger.kernel.org\n> > Date: Thursday, November 20, 2008, 3:08 PM\n> > On Thu, Nov 20, 2008 at 02:43:30PM -0800, Gary Yang\n> wrote:\n> > > Many thanks for your explanation. I hope I\n> understand\n> > what you said. I deleted /etc/xinetd.d/git-daemon.\n> Then, I\n> > tried to git pull. But, I got connection refused. git\n> uses\n> > port 9418. Should I request IT Admin to open the port\n> 9418\n> > for me?\n> > \n> > You'll need port 9418 open, yes; but since\n> it's an\n> > unprivileged port (1024 or\n> > higher), you can use it as a regular user and\n> don't\n> > need IT intervention unless you have some firewall set\n> up\n> > which they need to override for you.\n> > \n> > > git pull\n> git://git.mycompany.com/pub/git/u-boot.git\n> > HEAD\n> > > git.mycompany.com[0: 10.66.4.168]:\n> errno=Connection\n> > refused\n> > > fatal: unable to connect a socket (Connection\n> refused)\n> > \n> > It's possible, and likely simpler, to use\n> git-daemon\n> > directly, instead of\n> > having it be managed by inetd; especially for initial\n> > debugging, I'd recommend\n> > getting that working before trying to determine if\n> > you're having issues with\n> > inetd configuration: to do so, just run git-daemon\n> with all\n> > the same arguments\n> > except for --inetd.\n> > \n> > You said you deleted the xinetd config, but that's\n> only\n> > relevant if your\n> > machine actually uses inetd as its super-server.  You\n> > should do 'ps -A | grep\n> > inetd' (which will match either inetd or xinetd),\n> and\n> > see which one is running.\n> > If it's inetd, you should be all set, and the\n> issue\n> > doesn't look like inetd\n> > (assuming you sent it a signal to reload its config\n> file). \n> > If on the other\n> > hand xinetd is running, you need to use the xinetd\n> config\n> > file, and fix the\n> > server_args to look like the arguments which exist in\n> the\n> > inetd file.  Again,\n> > you need to signal xinetd at this point to reload its\n> > configuration.\n> > \n> > Based on the linux kernel version you're\n> reporting,\n> > I'm guessing you have some\n> > sort of Red Hat based system, which uses xinetd to the\n> best\n> > of my knowledge.\n> > \n> > > Another question, I got no output of\n> \"netstat |\n> > grep 9418\". It means no program runs at port 9418\n> at\n> > the public repository machine. Is it correct?\n> > > \n> > > netstat | grep 9418\n> > \n> > netstat translates IP addresses to dns names, and\n> ports to\n> > service names by\n> > default; so, given the line listed in /etc/services,\n> this\n> > will show\n> > '0.0.0.0:git' or something.  Also, it lists\n> > established connections, not\n> > listening sockets, by default.  I'd recommend\n> spending\n> > some time with the man\n> > page if you're going to use it to debug your\n> setup.\n> > \n> > Deskin Miller\n> \n> \n>       \n> --\n> To unsubscribe from this list: send the line\n> \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at \n> http://vger.kernel.org/majordomo-info.html\n\n\n      \n"},{"id":"96292","messageId":"1227225590.2709.10.camel@localhost.localdomain","threadId":"16415","inReplyTo":"636576.92732.qm@web37905.mail.mud.yahoo.com","subject":"Re: Challenge of setting up git server (repository). Please help!","fromName":"J.H.","fromEmail":"warthog19@eaglescrag.net","sentAt":"2008-11-20T23:59:50Z","receivedAt":"2008-11-20T23:59:50Z","isPatch":false,"sender":{"key":"warthog19@eaglescrag.net","avatar":null},"body":"Yes.\n\n- John 'Warthog9' Hawley\nChief Kernel.org Administrator\n\n\nOn Thu, 2008-11-20 at 15:54 -0800, Gary Yang wrote:\n> Do I need to restart  xinetd after I made changes in /etc/xinetd.d/git-daemon?\n> \n> \n> --- On Thu, 11/20/08, Gary Yang <garyyang6@yahoo.com> wrote:\n> \n> > From: Gary Yang <garyyang6@yahoo.com>\n> > Subject: Re: Challenge of setting up git server (repository). Please help!\n> > To: \"Deskin Miller\" <deskinm@umich.edu>\n> > Cc: git@vger.kernel.org\n> > Date: Thursday, November 20, 2008, 3:48 PM\n> > I ran the command,\"sudo\n> > /usr/local/libexec/git-core/git-daemon git-daemon\n> > --export-all /pub/git &\" at public repository\n> > machine.\n> > \n> > At my private machine, I ran, git pull\n> > git://svdcgit01.amcc.com/pub/git/u-boot.git HEAD\"\n> > \n> > I got: \"fatal: The remote end hung up\n> > unexpectedly\"\n> > \n> > At the public repository server, I got\n> > \"'/pub/git/u-boot.git': repository not\n> > exported.\" Any idea of this error?\n> > \n> > \n> > ps -A | grep inetd\n> >  8874 ?        00:00:00 xinetd\n> > \n> > It means it uses xinetd.\n> > \n> > I copied git-daemon back to /etc/xinetd.d and added\n> > git-daemon to the server_args. See below:\n> > \n> > cat /etc/xinetd.d/git-daemon\n> > # default: off\n> > # description: The git server offers access to git\n> > repositories\n> > service git\n> > {\n> >         disable = no\n> >         type            = UNLISTED\n> >         port            = 9418\n> >         socket_type     = stream\n> >         wait            = no\n> >         user            = nobody\n> >         server          =\n> > /usr/local/libexec/git-core/git-daemon\n> >         server_args     = git-daemon --inetd --export-all\n> > --base-path=/pub/git\n> >         log_on_failure  += USERID\n> > }\n> > \n> > \n> > I kill the daemon\n> > \"/usr/local/libexec/git-core/git-daemon git-daemon\n> > --export-all /pub/git &\". \n> > \n> > Back to my private box, and did git pull. I got Connection\n> > refused again. what I did wrong?\n> > \n> > git pull git://svdcgit01.amcc.com/pub/git/u-boot.git HEAD\n> > svdcgit01.amcc.com[0: 10.66.4.168]: errno=Connection\n> > refused\n> > fatal: unable to connect a socket (Connection refused)\n> > \n> > \n> > \n> > \n> > --- On Thu, 11/20/08, Deskin Miller\n> > <deskinm@umich.edu> wrote:\n> > \n> > > From: Deskin Miller <deskinm@umich.edu>\n> > > Subject: Re: Challenge of setting up git server\n> > (repository). Please help!\n> > > To: \"Gary Yang\" <garyyang6@yahoo.com>\n> > > Cc: git@vger.kernel.org\n> > > Date: Thursday, November 20, 2008, 3:08 PM\n> > > On Thu, Nov 20, 2008 at 02:43:30PM -0800, Gary Yang\n> > wrote:\n> > > > Many thanks for your explanation. I hope I\n> > understand\n> > > what you said. I deleted /etc/xinetd.d/git-daemon.\n> > Then, I\n> > > tried to git pull. But, I got connection refused. git\n> > uses\n> > > port 9418. Should I request IT Admin to open the port\n> > 9418\n> > > for me?\n> > > \n> > > You'll need port 9418 open, yes; but since\n> > it's an\n> > > unprivileged port (1024 or\n> > > higher), you can use it as a regular user and\n> > don't\n> > > need IT intervention unless you have some firewall set\n> > up\n> > > which they need to override for you.\n> > > \n> > > > git pull\n> > git://git.mycompany.com/pub/git/u-boot.git\n> > > HEAD\n> > > > git.mycompany.com[0: 10.66.4.168]:\n> > errno=Connection\n> > > refused\n> > > > fatal: unable to connect a socket (Connection\n> > refused)\n> > > \n> > > It's possible, and likely simpler, to use\n> > git-daemon\n> > > directly, instead of\n> > > having it be managed by inetd; especially for initial\n> > > debugging, I'd recommend\n> > > getting that working before trying to determine if\n> > > you're having issues with\n> > > inetd configuration: to do so, just run git-daemon\n> > with all\n> > > the same arguments\n> > > except for --inetd.\n> > > \n> > > You said you deleted the xinetd config, but that's\n> > only\n> > > relevant if your\n> > > machine actually uses inetd as its super-server.  You\n> > > should do 'ps -A | grep\n> > > inetd' (which will match either inetd or xinetd),\n> > and\n> > > see which one is running.\n> > > If it's inetd, you should be all set, and the\n> > issue\n> > > doesn't look like inetd\n> > > (assuming you sent it a signal to reload its config\n> > file). \n> > > If on the other\n> > > hand xinetd is running, you need to use the xinetd\n> > config\n> > > file, and fix the\n> > > server_args to look like the arguments which exist in\n> > the\n> > > inetd file.  Again,\n> > > you need to signal xinetd at this point to reload its\n> > > configuration.\n> > > \n> > > Based on the linux kernel version you're\n> > reporting,\n> > > I'm guessing you have some\n> > > sort of Red Hat based system, which uses xinetd to the\n> > best\n> > > of my knowledge.\n> > > \n> > > > Another question, I got no output of\n> > \"netstat |\n> > > grep 9418\". It means no program runs at port 9418\n> > at\n> > > the public repository machine. Is it correct?\n> > > > \n> > > > netstat | grep 9418\n> > > \n> > > netstat translates IP addresses to dns names, and\n> > ports to\n> > > service names by\n> > > default; so, given the line listed in /etc/services,\n> > this\n> > > will show\n> > > '0.0.0.0:git' or something.  Also, it lists\n> > > established connections, not\n> > > listening sockets, by default.  I'd recommend\n> > spending\n> > > some time with the man\n> > > page if you're going to use it to debug your\n> > setup.\n> > > \n> > > Deskin Miller\n> > \n> > \n> >       \n> > --\n> > To unsubscribe from this list: send the line\n> > \"unsubscribe git\" in\n> > the body of a message to majordomo@vger.kernel.org\n> > More majordomo info at \n> > http://vger.kernel.org/majordomo-info.html\n> \n> \n>       \n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"},{"id":"96293","messageId":"21729.63919.qm@web37901.mail.mud.yahoo.com","threadId":"16415","inReplyTo":"1227225590.2709.10.camel@localhost.localdomain","subject":"Re: Challenge of setting up git server (repository). Please help!","fromName":"Gary Yang","fromEmail":"garyyang6@yahoo.com","sentAt":"2008-11-21T00:12:38Z","receivedAt":"2008-11-21T00:12:38Z","isPatch":false,"sender":{"key":"garyyang6@yahoo.com","avatar":null},"body":"I am not system admin. How to restart it? Can I do this?\n\nsudo xinetd -stayalive -pidfile /var/run/xinetd.pid\n\n\nBelow is the output of current running xinetd\n\nps -efww | grep xinetd\nroot      8874     1  0 Sep24 ?        00:00:00 xinetd -stayalive -pidfile /var/run/xinetd.pid\n\n\nThanks.\n\n\n--- On Thu, 11/20/08, J.H. <warthog19@eaglescrag.net> wrote:\n\n> From: J.H. <warthog19@eaglescrag.net>\n> Subject: Re: Challenge of setting up git server (repository). Please help!\n> To: garyyang6@yahoo.com\n> Cc: \"Deskin Miller\" <deskinm@umich.edu>, git@vger.kernel.org\n> Date: Thursday, November 20, 2008, 3:59 PM\n> Yes.\n> \n> - John 'Warthog9' Hawley\n> Chief Kernel.org Administrator\n> \n> \n> On Thu, 2008-11-20 at 15:54 -0800, Gary Yang wrote:\n> > Do I need to restart  xinetd after I made changes in\n> /etc/xinetd.d/git-daemon?\n> > \n> > \n> > --- On Thu, 11/20/08, Gary Yang\n> <garyyang6@yahoo.com> wrote:\n> > \n> > > From: Gary Yang <garyyang6@yahoo.com>\n> > > Subject: Re: Challenge of setting up git server\n> (repository). Please help!\n> > > To: \"Deskin Miller\"\n> <deskinm@umich.edu>\n> > > Cc: git@vger.kernel.org\n> > > Date: Thursday, November 20, 2008, 3:48 PM\n> > > I ran the command,\"sudo\n> > > /usr/local/libexec/git-core/git-daemon git-daemon\n> > > --export-all /pub/git &\" at public\n> repository\n> > > machine.\n> > > \n> > > At my private machine, I ran, git pull\n> > > git://svdcgit01.amcc.com/pub/git/u-boot.git\n> HEAD\"\n> > > \n> > > I got: \"fatal: The remote end hung up\n> > > unexpectedly\"\n> > > \n> > > At the public repository server, I got\n> > > \"'/pub/git/u-boot.git': repository\n> not\n> > > exported.\" Any idea of this error?\n> > > \n> > > \n> > > ps -A | grep inetd\n> > >  8874 ?        00:00:00 xinetd\n> > > \n> > > It means it uses xinetd.\n> > > \n> > > I copied git-daemon back to /etc/xinetd.d and\n> added\n> > > git-daemon to the server_args. See below:\n> > > \n> > > cat /etc/xinetd.d/git-daemon\n> > > # default: off\n> > > # description: The git server offers access to\n> git\n> > > repositories\n> > > service git\n> > > {\n> > >         disable = no\n> > >         type            = UNLISTED\n> > >         port            = 9418\n> > >         socket_type     = stream\n> > >         wait            = no\n> > >         user            = nobody\n> > >         server          =\n> > > /usr/local/libexec/git-core/git-daemon\n> > >         server_args     = git-daemon --inetd\n> --export-all\n> > > --base-path=/pub/git\n> > >         log_on_failure  += USERID\n> > > }\n> > > \n> > > \n> > > I kill the daemon\n> > > \"/usr/local/libexec/git-core/git-daemon\n> git-daemon\n> > > --export-all /pub/git &\". \n> > > \n> > > Back to my private box, and did git pull. I got\n> Connection\n> > > refused again. what I did wrong?\n> > > \n> > > git pull\n> git://svdcgit01.amcc.com/pub/git/u-boot.git HEAD\n> > > svdcgit01.amcc.com[0: 10.66.4.168]:\n> errno=Connection\n> > > refused\n> > > fatal: unable to connect a socket (Connection\n> refused)\n> > > \n> > > \n> > > \n> > > \n> > > --- On Thu, 11/20/08, Deskin Miller\n> > > <deskinm@umich.edu> wrote:\n> > > \n> > > > From: Deskin Miller\n> <deskinm@umich.edu>\n> > > > Subject: Re: Challenge of setting up git\n> server\n> > > (repository). Please help!\n> > > > To: \"Gary Yang\"\n> <garyyang6@yahoo.com>\n> > > > Cc: git@vger.kernel.org\n> > > > Date: Thursday, November 20, 2008, 3:08 PM\n> > > > On Thu, Nov 20, 2008 at 02:43:30PM -0800,\n> Gary Yang\n> > > wrote:\n> > > > > Many thanks for your explanation. I\n> hope I\n> > > understand\n> > > > what you said. I deleted\n> /etc/xinetd.d/git-daemon.\n> > > Then, I\n> > > > tried to git pull. But, I got connection\n> refused. git\n> > > uses\n> > > > port 9418. Should I request IT Admin to open\n> the port\n> > > 9418\n> > > > for me?\n> > > > \n> > > > You'll need port 9418 open, yes; but\n> since\n> > > it's an\n> > > > unprivileged port (1024 or\n> > > > higher), you can use it as a regular user\n> and\n> > > don't\n> > > > need IT intervention unless you have some\n> firewall set\n> > > up\n> > > > which they need to override for you.\n> > > > \n> > > > > git pull\n> > > git://git.mycompany.com/pub/git/u-boot.git\n> > > > HEAD\n> > > > > git.mycompany.com[0: 10.66.4.168]:\n> > > errno=Connection\n> > > > refused\n> > > > > fatal: unable to connect a socket\n> (Connection\n> > > refused)\n> > > > \n> > > > It's possible, and likely simpler, to\n> use\n> > > git-daemon\n> > > > directly, instead of\n> > > > having it be managed by inetd; especially\n> for initial\n> > > > debugging, I'd recommend\n> > > > getting that working before trying to\n> determine if\n> > > > you're having issues with\n> > > > inetd configuration: to do so, just run\n> git-daemon\n> > > with all\n> > > > the same arguments\n> > > > except for --inetd.\n> > > > \n> > > > You said you deleted the xinetd config, but\n> that's\n> > > only\n> > > > relevant if your\n> > > > machine actually uses inetd as its\n> super-server.  You\n> > > > should do 'ps -A | grep\n> > > > inetd' (which will match either inetd or\n> xinetd),\n> > > and\n> > > > see which one is running.\n> > > > If it's inetd, you should be all set,\n> and the\n> > > issue\n> > > > doesn't look like inetd\n> > > > (assuming you sent it a signal to reload its\n> config\n> > > file). \n> > > > If on the other\n> > > > hand xinetd is running, you need to use the\n> xinetd\n> > > config\n> > > > file, and fix the\n> > > > server_args to look like the arguments which\n> exist in\n> > > the\n> > > > inetd file.  Again,\n> > > > you need to signal xinetd at this point to\n> reload its\n> > > > configuration.\n> > > > \n> > > > Based on the linux kernel version you're\n> > > reporting,\n> > > > I'm guessing you have some\n> > > > sort of Red Hat based system, which uses\n> xinetd to the\n> > > best\n> > > > of my knowledge.\n> > > > \n> > > > > Another question, I got no output of\n> > > \"netstat |\n> > > > grep 9418\". It means no program runs at\n> port 9418\n> > > at\n> > > > the public repository machine. Is it\n> correct?\n> > > > > \n> > > > > netstat | grep 9418\n> > > > \n> > > > netstat translates IP addresses to dns\n> names, and\n> > > ports to\n> > > > service names by\n> > > > default; so, given the line listed in\n> /etc/services,\n> > > this\n> > > > will show\n> > > > '0.0.0.0:git' or something.  Also,\n> it lists\n> > > > established connections, not\n> > > > listening sockets, by default.  I'd\n> recommend\n> > > spending\n> > > > some time with the man\n> > > > page if you're going to use it to debug\n> your\n> > > setup.\n> > > > \n> > > > Deskin Miller\n> > > \n> > > \n> > >       \n> > > --\n> > > To unsubscribe from this list: send the line\n> > > \"unsubscribe git\" in\n> > > the body of a message to\n> majordomo@vger.kernel.org\n> > > More majordomo info at \n> > > http://vger.kernel.org/majordomo-info.html\n> > \n> > \n> >       \n> > --\n> > To unsubscribe from this list: send the line\n> \"unsubscribe git\" in\n> > the body of a message to majordomo@vger.kernel.org\n> > More majordomo info at \n> http://vger.kernel.org/majordomo-info.html\n> \n> --\n> To unsubscribe from this list: send the line\n> \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at \n> http://vger.kernel.org/majordomo-info.html\n\n\n      \n"}]}