* git-clone works with ssh but not with http/https/git
@ 2008-06-24 11:15 Erez Zilber
2008-06-24 11:21 ` Matthias Kestenholz
0 siblings, 1 reply; 20+ messages in thread
From: Erez Zilber @ 2008-06-24 11:15 UTC (permalink / raw)
To: git
Hi,
I'm able to git-clone a tree using ssh:
[root@kd001 t]# git-clone
ssh://erez.zilber@kites/pub/git/erez.zilber/my_test.git
Initialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/
erez.zilber@kites's password:
remote: Counting objects: 9, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 9 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (9/9), done.
However, it doesn't work with http/https/git:
[root@kd001 t]# git-clone http://kites/pub/git/erez.zilber/my_test.git
Initialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/
Cannot get remote repository information.
Perhaps git-update-server-info needs to be run there?
[root@kd001 t]# git-clone https://kites/pub/git/erez.zilber/my_test.git
Initialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/
Cannot get remote repository information.
Perhaps git-update-server-info needs to be run there?
[root@kd001 t]# git-clone git://kites/pub/git/erez.zilber/my_test.git
Initialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/
kites[0: 172.16.1.11]: errno=Connection refused
fatal: unable to connect a socket (Connection refused)
fetch-pack from 'git://kites/pub/git/erez.zilber/my_test.git' failed.
What's the problem?
Thanks,
Erez
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git-clone works with ssh but not with http/https/git
2008-06-24 11:15 git-clone works with ssh but not with http/https/git Erez Zilber
@ 2008-06-24 11:21 ` Matthias Kestenholz
2008-06-24 11:45 ` Erez Zilber
0 siblings, 1 reply; 20+ messages in thread
From: Matthias Kestenholz @ 2008-06-24 11:21 UTC (permalink / raw)
To: Erez Zilber; +Cc: git
On Tue, 2008-06-24 at 14:15 +0300, Erez Zilber wrote:
> Hi,
>
> I'm able to git-clone a tree using ssh:
>
> [root@kd001 t]# git-clone
> ssh://erez.zilber@kites/pub/git/erez.zilber/my_test.git
> Initialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/
> erez.zilber@kites's password:
> remote: Counting objects: 9, done.
> remote: Compressing objects: 100% (5/5), done.
> remote: Total 9 (delta 0), reused 0 (delta 0)
> Receiving objects: 100% (9/9), done.
>
> However, it doesn't work with http/https/git:
>
> [root@kd001 t]# git-clone http://kites/pub/git/erez.zilber/my_test.git
> Initialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/
> Cannot get remote repository information.
> Perhaps git-update-server-info needs to be run there?
>
Maybe you should run git-update-server-info in the repository on the
server?
> [root@kd001 t]# git-clone https://kites/pub/git/erez.zilber/my_test.git
> Initialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/
> Cannot get remote repository information.
> Perhaps git-update-server-info needs to be run there?
Maybe you should run git-update-server-info in the repository on the
server?
By the way, try enabling the post-update hook -- it runs
update-server-info for you automatically after pushing to your server
(make the script $GIT_DIR/hooks/post-update executable)
> [root@kd001 t]# git-clone git://kites/pub/git/erez.zilber/my_test.git
> Initialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/
> kites[0: 172.16.1.11]: errno=Connection refused
> fatal: unable to connect a socket (Connection refused)
> fetch-pack from 'git://kites/pub/git/erez.zilber/my_test.git' failed.
>
Is the git daemon running on your server? You need to configure inetd or
git-daemon yourself, that is not done automatically for you.
--
http://spinlock.ch/blog/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git-clone works with ssh but not with http/https/git
2008-06-24 11:21 ` Matthias Kestenholz
@ 2008-06-24 11:45 ` Erez Zilber
2008-06-24 11:48 ` Johannes Schindelin
2008-06-24 12:35 ` Robert Haines
0 siblings, 2 replies; 20+ messages in thread
From: Erez Zilber @ 2008-06-24 11:45 UTC (permalink / raw)
To: Matthias Kestenholz; +Cc: git
On Tue, Jun 24, 2008 at 2:21 PM, Matthias Kestenholz <mk@spinlock.ch> wrote:
> On Tue, 2008-06-24 at 14:15 +0300, Erez Zilber wrote:
>> Hi,
>>
>> I'm able to git-clone a tree using ssh:
>>
>> [root@kd001 t]# git-clone
>> ssh://erez.zilber@kites/pub/git/erez.zilber/my_test.git
>> Initialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/
>> erez.zilber@kites's password:
>> remote: Counting objects: 9, done.
>> remote: Compressing objects: 100% (5/5), done.
>> remote: Total 9 (delta 0), reused 0 (delta 0)
>> Receiving objects: 100% (9/9), done.
>>
>> However, it doesn't work with http/https/git:
>>
>> [root@kd001 t]# git-clone http://kites/pub/git/erez.zilber/my_test.git
>> Initialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/
>> Cannot get remote repository information.
>> Perhaps git-update-server-info needs to be run there?
>>
>
> Maybe you should run git-update-server-info in the repository on the
> server?
Forgot to mention - I tried to run git-update-server-info from the
repository on the server. I got the same results. BTW - if it works OK
with ssh, I can only guess that git-update-server-info won't help for
http. right?
>
>> [root@kd001 t]# git-clone https://kites/pub/git/erez.zilber/my_test.git
>> Initialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/
>> Cannot get remote repository information.
>> Perhaps git-update-server-info needs to be run there?
>
>
> Maybe you should run git-update-server-info in the repository on the
> server?
>
> By the way, try enabling the post-update hook -- it runs
> update-server-info for you automatically after pushing to your server
> (make the script $GIT_DIR/hooks/post-update executable)
Make it executable on the client side before pushing (i.e. in
.git/hooks/post-update) or on the server side after pushing?
>
>> [root@kd001 t]# git-clone git://kites/pub/git/erez.zilber/my_test.git
>> Initialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/
>> kites[0: 172.16.1.11]: errno=Connection refused
>> fatal: unable to connect a socket (Connection refused)
>> fetch-pack from 'git://kites/pub/git/erez.zilber/my_test.git' failed.
>>
>
> Is the git daemon running on your server? You need to configure inetd or
> git-daemon yourself, that is not done automatically for you.
>
I ran git-daemon on the server side like this:
sudo git-daemon --base-path=/pub/git/ --export-all --listen=kites
Erez
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git-clone works with ssh but not with http/https/git
2008-06-24 11:45 ` Erez Zilber
@ 2008-06-24 11:48 ` Johannes Schindelin
2008-06-24 12:07 ` Erez Zilber
2008-06-24 12:35 ` Robert Haines
1 sibling, 1 reply; 20+ messages in thread
From: Johannes Schindelin @ 2008-06-24 11:48 UTC (permalink / raw)
To: Erez Zilber; +Cc: Matthias Kestenholz, git
Hi,
On Tue, 24 Jun 2008, Erez Zilber wrote:
> On Tue, Jun 24, 2008 at 2:21 PM, Matthias Kestenholz <mk@spinlock.ch> wrote:
> > On Tue, 2008-06-24 at 14:15 +0300, Erez Zilber wrote:
> >
> >> [root@kd001 t]# git-clone http://kites/pub/git/erez.zilber/my_test.git
> >> Initialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/
> >> Cannot get remote repository information.
> >> Perhaps git-update-server-info needs to be run there?
> >>
> >
> > Maybe you should run git-update-server-info in the repository on the
> > server?
>
> Forgot to mention - I tried to run git-update-server-info from the
> repository on the server.
No, you did not. Otherwise, the message would not appear. It can be that
you have _another_ repository on the server, but running
update-server-info there does not help.
> I got the same results. BTW - if it works OK with ssh, I can only guess
> that git-update-server-info won't help for http. right?
Wrong again. ssh transport is special, and does not need the information
update-server-info provides.
Hth,
Dscho
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git-clone works with ssh but not with http/https/git
2008-06-24 11:48 ` Johannes Schindelin
@ 2008-06-24 12:07 ` Erez Zilber
2008-06-24 12:25 ` Jakub Narebski
2008-06-24 12:41 ` Johannes Sixt
0 siblings, 2 replies; 20+ messages in thread
From: Erez Zilber @ 2008-06-24 12:07 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Matthias Kestenholz, git
On Tue, Jun 24, 2008 at 2:48 PM, Johannes Schindelin
<Johannes.Schindelin@gmx.de> wrote:
> Hi,
>
> On Tue, 24 Jun 2008, Erez Zilber wrote:
>
>> On Tue, Jun 24, 2008 at 2:21 PM, Matthias Kestenholz <mk@spinlock.ch> wrote:
>> > On Tue, 2008-06-24 at 14:15 +0300, Erez Zilber wrote:
>> >
>> >> [root@kd001 t]# git-clone http://kites/pub/git/erez.zilber/my_test.git
>> >> Initialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/
>> >> Cannot get remote repository information.
>> >> Perhaps git-update-server-info needs to be run there?
>> >>
>> >
>> > Maybe you should run git-update-server-info in the repository on the
>> > server?
>>
>> Forgot to mention - I tried to run git-update-server-info from the
>> repository on the server.
>
> No, you did not. Otherwise, the message would not appear. It can be that
> you have _another_ repository on the server, but running
> update-server-info there does not help.
Thanks for the quick answer. I'm sure that something _is_ wrong.
Otherwise, everything should have worked already.
I think that I'm using the right repository for git-clone because it's
the same path that I used for git push:
[root@kd001 my_test.git]# git-push --all
ssh://erez.zilber@kites/pub/git/erez.zilber/my_test.git
erez.zilber@kites's password:
Counting objects: 9, done.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (9/9), 740 bytes, done.
Total 9 (delta 0), reused 0 (delta 0)
To ssh://erez.zilber@kites/pub/git/erez.zilber/my_test.git
* [new branch] master -> master
Now, on the server side:
-sh-3.1$ cd my_test.git/
-sh-3.1$ ls info/
exclude
-sh-3.1$ git-update-server-info
-sh-3.1$ ls info/
exclude refs
looks like git-update-server-info did some work (added the refs file).
Back to the client:
[root@kd001 t]# git-clone http://kites/pub/git/erez.zilber/my_test.git
Initialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/
Cannot get remote repository information.
Perhaps git-update-server-info needs to be run there?
The path is the same path that was used for pushing the repository.
What did I miss here?
Thanks,
Erez
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git-clone works with ssh but not with http/https/git
2008-06-24 12:07 ` Erez Zilber
@ 2008-06-24 12:25 ` Jakub Narebski
2008-06-24 13:42 ` Erez Zilber
2008-06-24 12:41 ` Johannes Sixt
1 sibling, 1 reply; 20+ messages in thread
From: Jakub Narebski @ 2008-06-24 12:25 UTC (permalink / raw)
To: Erez Zilber; +Cc: Johannes Schindelin, Matthias Kestenholz, git
"Erez Zilber" <erezzi.list@gmail.com> writes:
> I think that I'm using the right repository for git-clone because it's
> the same path that I used for git push:
>
> [root@kd001 my_test.git]# git-push --all
> ssh://erez.zilber@kites/pub/git/erez.zilber/my_test.git
[...]
> looks like git-update-server-info did some work (added the refs file).
>
> Back to the client:
>
> [root@kd001 t]# git-clone http://kites/pub/git/erez.zilber/my_test.git
> Initialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/
> Cannot get remote repository information.
> Perhaps git-update-server-info needs to be run there?
>
> The path is the same path that was used for pushing the repository.
> What did I miss here?
First, obvious question: do you have web server enabled?
Second, less obvious: how this server maps pathname information from
URL into path in the filesystem?
--
Jakub Narebski
Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git-clone works with ssh but not with http/https/git
2008-06-24 11:45 ` Erez Zilber
2008-06-24 11:48 ` Johannes Schindelin
@ 2008-06-24 12:35 ` Robert Haines
2008-06-24 13:53 ` Erez Zilber
1 sibling, 1 reply; 20+ messages in thread
From: Robert Haines @ 2008-06-24 12:35 UTC (permalink / raw)
To: Erez Zilber; +Cc: Matthias Kestenholz, git
> I ran git-daemon on the server side like this:
>
> sudo git-daemon --base-path=/pub/git/ --export-all --listen=kites
So your clone address for git:// is wrong, you don't need the /pub/git:
git clone git://erez.zilber@kites/erez.zilber/my_test.git
As you've moved the root of the filesystem as far as git-daemon is
concerned to /pub/git with the --base-path option. I suspect a similar
problem for http[s] depending on how you've mapped /pub/git into your
webserver.
rather than:
git clone ssh://erez.zilber@kites/pub/git/erez.zilber/my_test.git
for ssh which does start at the root of the filesystem.
Cheers,
Rob
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git-clone works with ssh but not with http/https/git
2008-06-24 12:07 ` Erez Zilber
2008-06-24 12:25 ` Jakub Narebski
@ 2008-06-24 12:41 ` Johannes Sixt
1 sibling, 0 replies; 20+ messages in thread
From: Johannes Sixt @ 2008-06-24 12:41 UTC (permalink / raw)
To: Erez Zilber; +Cc: Johannes Schindelin, Matthias Kestenholz, git
Erez Zilber schrieb:
> [root@kd001 my_test.git]# git-push --all
> ssh://erez.zilber@kites/pub/git/erez.zilber/my_test.git
> erez.zilber@kites's password:
> Counting objects: 9, done.
> Compressing objects: 100% (5/5), done.
> Writing objects: 100% (9/9), 740 bytes, done.
> Total 9 (delta 0), reused 0 (delta 0)
> To ssh://erez.zilber@kites/pub/git/erez.zilber/my_test.git
> * [new branch] master -> master
>
> Now, on the server side:
>
> -sh-3.1$ cd my_test.git/
> -sh-3.1$ ls info/
> exclude
> -sh-3.1$ git-update-server-info
> -sh-3.1$ ls info/
> exclude refs
>
> looks like git-update-server-info did some work (added the refs file).
>
> Back to the client:
>
> [root@kd001 t]# git-clone http://kites/pub/git/erez.zilber/my_test.git
> Initialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/
> Cannot get remote repository information.
> Perhaps git-update-server-info needs to be run there?
>
> The path is the same path that was used for pushing the repository.
No, it's not. You pushed via ssh, but you clone via http.
When you point your web browser to
http://kites/pub/git/erez.zilber/my_test.git
what do you see? Error 404 or a directory listing?
-- Hannes
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git-clone works with ssh but not with http/https/git
2008-06-24 12:25 ` Jakub Narebski
@ 2008-06-24 13:42 ` Erez Zilber
2008-06-24 13:54 ` Anton Gladkov
2008-06-24 14:05 ` Matthieu Moy
0 siblings, 2 replies; 20+ messages in thread
From: Erez Zilber @ 2008-06-24 13:42 UTC (permalink / raw)
To: Jakub Narebski; +Cc: Johannes Schindelin, Matthias Kestenholz, git
On Tue, Jun 24, 2008 at 3:25 PM, Jakub Narebski <jnareb@gmail.com> wrote:
> "Erez Zilber" <erezzi.list@gmail.com> writes:
>
>> I think that I'm using the right repository for git-clone because it's
>> the same path that I used for git push:
>>
>> [root@kd001 my_test.git]# git-push --all
>> ssh://erez.zilber@kites/pub/git/erez.zilber/my_test.git
>
> [...]
>> looks like git-update-server-info did some work (added the refs file).
>>
>> Back to the client:
>>
>> [root@kd001 t]# git-clone http://kites/pub/git/erez.zilber/my_test.git
>> Initialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/
>> Cannot get remote repository information.
>> Perhaps git-update-server-info needs to be run there?
>>
>> The path is the same path that was used for pushing the repository.
>> What did I miss here?
>
> First, obvious question: do you have web server enabled?
>
Yes
> Second, less obvious: how this server maps pathname information from
> URL into path in the filesystem?
I guess that the problem is that no proper mapping exists. That's why
I see the following in /var/log/httpd/error_log:
[Tue Jun 24 16:31:52 2008] [error] [client 172.16.0.7] File does not
exist: /var/www/html/pub
What do I need to add in /etc/httpd/conf.d/ in order to set the
mapping to /pub/git instead of /var/www/html/pub ? Is there an example
that shows how to map?
Thanks,
Erez
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git-clone works with ssh but not with http/https/git
2008-06-24 12:35 ` Robert Haines
@ 2008-06-24 13:53 ` Erez Zilber
2008-06-24 14:08 ` Robert Haines
0 siblings, 1 reply; 20+ messages in thread
From: Erez Zilber @ 2008-06-24 13:53 UTC (permalink / raw)
To: Robert Haines; +Cc: Matthias Kestenholz, git
On Tue, Jun 24, 2008 at 3:35 PM, Robert Haines <rhaines@manchester.ac.uk> wrote:
>> I ran git-daemon on the server side like this:
>>
>> sudo git-daemon --base-path=/pub/git/ --export-all --listen=kites
>
> So your clone address for git:// is wrong, you don't need the /pub/git:
> git clone git://erez.zilber@kites/erez.zilber/my_test.git
> As you've moved the root of the filesystem as far as git-daemon is concerned
> to /pub/git with the --base-path option.
I understand. However, when I try to run it according to your suggestion:
[root@kd001 t]# git clone git://erez.zilber@kites/erez.zilber/my_test.git
Initialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/
fatal: Unable to look up erez.zilber@kites (port 9418) (Name or
service not known)
fetch-pack from 'git://erez.zilber@kites/erez.zilber/my_test.git' failed.
I also tried to run it without "erez.zilber@":
[root@kd001 t]# git clone git://kites/erez.zilber/my_test.git
Initialized empty Git repository in /home/erez.zilber/work/tmp/t/my_test/.git/
kites[0: 172.16.1.11]: errno=Connection refused
fatal: unable to connect a socket (Connection refused)
fetch-pack from 'git://kites/erez.zilber/my_test.git' failed.
Is there any log file on the server that can help me trace this
problem (something like /var/log/httpd/error_log but for the git
protocol)?
Thanks,
Erez
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git-clone works with ssh but not with http/https/git
2008-06-24 13:42 ` Erez Zilber
@ 2008-06-24 13:54 ` Anton Gladkov
2008-06-24 13:59 ` Anton Gladkov
` (2 more replies)
2008-06-24 14:05 ` Matthieu Moy
1 sibling, 3 replies; 20+ messages in thread
From: Anton Gladkov @ 2008-06-24 13:54 UTC (permalink / raw)
To: Erez Zilber
Cc: Jakub Narebski, Johannes Schindelin, Matthias Kestenholz,
git@vger.kernel.org
On Tue, Jun 24, 2008 at 05:42:14PM +0400, Erez Zilber wrote:
> I guess that the problem is that no proper mapping exists. That's why
> I see the following in /var/log/httpd/error_log:
>
> [Tue Jun 24 16:31:52 2008] [error] [client 172.16.0.7] File does not
> exist: /var/www/html/pub
>
> What do I need to add in /etc/httpd/conf.d/ in order to set the
> mapping to /pub/git instead of /var/www/html/pub ? Is there an example
> that shows how to map?
IMO the simplest way is to create a symlink 'pub' in /var/www/html directory
pointing to /pub and to add 'Options FollowSymLinks' to <Directory /> in httpd.conf.
--
Best regards,
Anton
mailto:agladkov@parallels.com
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git-clone works with ssh but not with http/https/git
2008-06-24 13:54 ` Anton Gladkov
@ 2008-06-24 13:59 ` Anton Gladkov
2008-06-24 14:02 ` Matthias Kestenholz
2008-06-24 14:16 ` Erez Zilber
2008-06-24 18:58 ` Jakub Narebski
2 siblings, 1 reply; 20+ messages in thread
From: Anton Gladkov @ 2008-06-24 13:59 UTC (permalink / raw)
To: Erez Zilber
Cc: Jakub Narebski, Johannes Schindelin, Matthias Kestenholz,
git@vger.kernel.org
On Tue, Jun 24, 2008 at 05:54:29PM +0400, Anton Gladkov wrote:
> On Tue, Jun 24, 2008 at 05:42:14PM +0400, Erez Zilber wrote:
> > I guess that the problem is that no proper mapping exists. That's why
> > I see the following in /var/log/httpd/error_log:
> >
> > [Tue Jun 24 16:31:52 2008] [error] [client 172.16.0.7] File does not
> > exist: /var/www/html/pub
> >
> > What do I need to add in /etc/httpd/conf.d/ in order to set the
> > mapping to /pub/git instead of /var/www/html/pub ? Is there an example
> > that shows how to map?
>
> IMO the simplest way is to create a symlink 'pub' in /var/www/html directory
> pointing to /pub and to add 'Options FollowSymLinks' to <Directory /> in httpd.conf.
But, I think it will not help you.
AFAIK you need a gitweb.
--
Best regards,
Anton
mailto:agladkov@parallels.com
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git-clone works with ssh but not with http/https/git
2008-06-24 13:59 ` Anton Gladkov
@ 2008-06-24 14:02 ` Matthias Kestenholz
0 siblings, 0 replies; 20+ messages in thread
From: Matthias Kestenholz @ 2008-06-24 14:02 UTC (permalink / raw)
To: Anton Gladkov
Cc: Erez Zilber, Jakub Narebski, Johannes Schindelin,
git@vger.kernel.org
On Tue, 2008-06-24 at 17:59 +0400, Anton Gladkov wrote:
> On Tue, Jun 24, 2008 at 05:54:29PM +0400, Anton Gladkov wrote:
> > On Tue, Jun 24, 2008 at 05:42:14PM +0400, Erez Zilber wrote:
> > > I guess that the problem is that no proper mapping exists. That's why
> > > I see the following in /var/log/httpd/error_log:
> > >
> > > [Tue Jun 24 16:31:52 2008] [error] [client 172.16.0.7] File does not
> > > exist: /var/www/html/pub
> > >
> > > What do I need to add in /etc/httpd/conf.d/ in order to set the
> > > mapping to /pub/git instead of /var/www/html/pub ? Is there an example
> > > that shows how to map?
> >
> > IMO the simplest way is to create a symlink 'pub' in /var/www/html directory
> > pointing to /pub and to add 'Options FollowSymLinks' to <Directory /> in httpd.conf.
>
> But, I think it will not help you.
> AFAIK you need a gitweb.
>
To be able to use the HTTP git transport? No. If you use the HTTP
transport to clone a repository, gitweb is not used in any way.
--
http://spinlock.ch/blog/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git-clone works with ssh but not with http/https/git
2008-06-24 13:42 ` Erez Zilber
2008-06-24 13:54 ` Anton Gladkov
@ 2008-06-24 14:05 ` Matthieu Moy
1 sibling, 0 replies; 20+ messages in thread
From: Matthieu Moy @ 2008-06-24 14:05 UTC (permalink / raw)
To: Erez Zilber; +Cc: Jakub Narebski, Johannes Schindelin, Matthias Kestenholz, git
"Erez Zilber" <erezzi.list@gmail.com> writes:
> I guess that the problem is that no proper mapping exists. That's why
> I see the following in /var/log/httpd/error_log:
>
> [Tue Jun 24 16:31:52 2008] [error] [client 172.16.0.7] File does not
> exist: /var/www/html/pub
>
> What do I need to add in /etc/httpd/conf.d/ in order to set the
> mapping to /pub/git instead of /var/www/html/pub ? Is there an example
> that shows how to map?
Try to access the repository from a web browser first. If you don't
have directory listing enabled, opening a file like HEAD should work.
--
Matthieu
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git-clone works with ssh but not with http/https/git
2008-06-24 13:53 ` Erez Zilber
@ 2008-06-24 14:08 ` Robert Haines
2008-06-24 14:45 ` Erez Zilber
0 siblings, 1 reply; 20+ messages in thread
From: Robert Haines @ 2008-06-24 14:08 UTC (permalink / raw)
To: Erez Zilber; +Cc: Matthias Kestenholz, git
>> So your clone address for git:// is wrong, you don't need the /pub/
>> git:
>> git clone git://erez.zilber@kites/erez.zilber/my_test.git
>> As you've moved the root of the filesystem as far as git-daemon is
>> concerned
>> to /pub/git with the --base-path option.
>
> I understand. However, when I try to run it according to your
> suggestion:
>
> [root@kd001 t]# git clone git://erez.zilber@kites/erez.zilber/
> my_test.git
> Initialized empty Git repository in /home/erez.zilber/work/tmp/t/
> my_test/.git/
> fatal: Unable to look up erez.zilber@kites (port 9418) (Name or
> service not known)
> fetch-pack from 'git://erez.zilber@kites/erez.zilber/my_test.git'
> failed.
That error is saying that the name of the service is wrong, so you're
right to do it without the "erez.zilber@" bit.
> I also tried to run it without "erez.zilber@":
>
> [root@kd001 t]# git clone git://kites/erez.zilber/my_test.git
> Initialized empty Git repository in /home/erez.zilber/work/tmp/t/
> my_test/.git/
> kites[0: 172.16.1.11]: errno=Connection refused
> fatal: unable to connect a socket (Connection refused)
> fetch-pack from 'git://kites/erez.zilber/my_test.git' failed.
This looks like that either there is nothing listening (if you're
running though xinetd have you restarted it? And have you added the
right bits to /etc/services?) or there's a firewall in the way... git
defaults to 9418 so check that it's open.
> Is there any log file on the server that can help me trace this
> problem (something like /var/log/httpd/error_log but for the git
> protocol)?
on my machine (running via xinetd) it goes straight into /var/log/
messages. A grep -i git on that file should produce something.
Cheers,
Rob
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git-clone works with ssh but not with http/https/git
2008-06-24 13:54 ` Anton Gladkov
2008-06-24 13:59 ` Anton Gladkov
@ 2008-06-24 14:16 ` Erez Zilber
2008-06-24 18:58 ` Jakub Narebski
2 siblings, 0 replies; 20+ messages in thread
From: Erez Zilber @ 2008-06-24 14:16 UTC (permalink / raw)
To: Anton Gladkov
Cc: Jakub Narebski, Johannes Schindelin, Matthias Kestenholz,
git@vger.kernel.org
On Tue, Jun 24, 2008 at 4:54 PM, Anton Gladkov <agladkov@parallels.com> wrote:
> On Tue, Jun 24, 2008 at 05:42:14PM +0400, Erez Zilber wrote:
>> I guess that the problem is that no proper mapping exists. That's why
>> I see the following in /var/log/httpd/error_log:
>>
>> [Tue Jun 24 16:31:52 2008] [error] [client 172.16.0.7] File does not
>> exist: /var/www/html/pub
>>
>> What do I need to add in /etc/httpd/conf.d/ in order to set the
>> mapping to /pub/git instead of /var/www/html/pub ? Is there an example
>> that shows how to map?
>
> IMO the simplest way is to create a symlink 'pub' in /var/www/html directory
> pointing to /pub and to add 'Options FollowSymLinks' to <Directory /> in httpd.conf.
Adding the symlink solved the cloning with http problem.
Thanks,
Erez
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git-clone works with ssh but not with http/https/git
2008-06-24 14:08 ` Robert Haines
@ 2008-06-24 14:45 ` Erez Zilber
2008-06-24 17:10 ` Daniel Barkalow
0 siblings, 1 reply; 20+ messages in thread
From: Erez Zilber @ 2008-06-24 14:45 UTC (permalink / raw)
To: Robert Haines; +Cc: Matthias Kestenholz, git
On Tue, Jun 24, 2008 at 5:08 PM, Robert Haines <rhaines@manchester.ac.uk> wrote:
>>> So your clone address for git:// is wrong, you don't need the /pub/git:
>>> git clone git://erez.zilber@kites/erez.zilber/my_test.git
>>> As you've moved the root of the filesystem as far as git-daemon is
>>> concerned
>>> to /pub/git with the --base-path option.
>>
>> I understand. However, when I try to run it according to your suggestion:
>>
>> [root@kd001 t]# git clone git://erez.zilber@kites/erez.zilber/my_test.git
>> Initialized empty Git repository in
>> /home/erez.zilber/work/tmp/t/my_test/.git/
>> fatal: Unable to look up erez.zilber@kites (port 9418) (Name or
>> service not known)
>> fetch-pack from 'git://erez.zilber@kites/erez.zilber/my_test.git' failed.
>
> That error is saying that the name of the service is wrong, so you're right
> to do it without the "erez.zilber@" bit.
>
>> I also tried to run it without "erez.zilber@":
>>
>> [root@kd001 t]# git clone git://kites/erez.zilber/my_test.git
>> Initialized empty Git repository in
>> /home/erez.zilber/work/tmp/t/my_test/.git/
>> kites[0: 172.16.1.11]: errno=Connection refused
>> fatal: unable to connect a socket (Connection refused)
>> fetch-pack from 'git://kites/erez.zilber/my_test.git' failed.
>
> This looks like that either there is nothing listening (if you're running
> though xinetd have you restarted it? And have you added the right bits to
> /etc/services?) or there's a firewall in the way... git defaults to 9418 so
> check that it's open.
The problem was that it listened to requests coming from the local
machine. Now (after fixing that), everything seems to work. Thanks for
the help.
BTW - I'm currently running git-daemon in the following way:
sudo git-daemon --base-path=/pub/git/ --export-all
Is there any advantage to run it through xinetd? How do you run it?
Thanks,
Erez
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git-clone works with ssh but not with http/https/git
2008-06-24 14:45 ` Erez Zilber
@ 2008-06-24 17:10 ` Daniel Barkalow
2008-06-25 6:56 ` Erez Zilber
0 siblings, 1 reply; 20+ messages in thread
From: Daniel Barkalow @ 2008-06-24 17:10 UTC (permalink / raw)
To: Erez Zilber; +Cc: Robert Haines, Matthias Kestenholz, git
On Tue, 24 Jun 2008, Erez Zilber wrote:
> BTW - I'm currently running git-daemon in the following way:
>
> sudo git-daemon --base-path=/pub/git/ --export-all
>
> Is there any advantage to run it through xinetd? How do you run it?
You probably want to run it from something that init runs, or you'll have
to figure it out again when you reboot the server in a while. So you
either want a suitable init script (Gentoo, for example, has one in their
git package), or to run it through xinetd (which you almost certainly have
an init script for).
-Daniel
*This .sig left intentionally blank*
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git-clone works with ssh but not with http/https/git
2008-06-24 13:54 ` Anton Gladkov
2008-06-24 13:59 ` Anton Gladkov
2008-06-24 14:16 ` Erez Zilber
@ 2008-06-24 18:58 ` Jakub Narebski
2 siblings, 0 replies; 20+ messages in thread
From: Jakub Narebski @ 2008-06-24 18:58 UTC (permalink / raw)
To: Anton Gladkov
Cc: Erez Zilber, Johannes Schindelin, Matthias Kestenholz,
git@vger.kernel.org
On Tue, 24 Jun 2008, Anton Gladkov wrote:
> On Tue, Jun 24, 2008 at 05:42:14PM +0400, Erez Zilber wrote:
> >
> > I guess that the problem is that no proper mapping exists. That's why
> > I see the following in /var/log/httpd/error_log:
> >
> > [Tue Jun 24 16:31:52 2008] [error] [client 172.16.0.7] File does not
> > exist: /var/www/html/pub
> >
> > What do I need to add in /etc/httpd/conf.d/ in order to set the
> > mapping to /pub/git instead of /var/www/html/pub ? Is there an example
> > that shows how to map?
>
> IMO the simplest way is to create a symlink 'pub' in /var/www/html directory
> pointing to /pub and to add 'Options FollowSymLinks' to <Directory /> in httpd.conf.
Another solution (not necessary simplest, but it might be preferred
from the security point of view) is to do some URL rewriting / redirection.
See your web server documentation for details...
--
Jakub Narebski
Poland
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: git-clone works with ssh but not with http/https/git
2008-06-24 17:10 ` Daniel Barkalow
@ 2008-06-25 6:56 ` Erez Zilber
0 siblings, 0 replies; 20+ messages in thread
From: Erez Zilber @ 2008-06-25 6:56 UTC (permalink / raw)
To: Daniel Barkalow; +Cc: Robert Haines, Matthias Kestenholz, git
On Tue, Jun 24, 2008 at 8:10 PM, Daniel Barkalow <barkalow@iabervon.org> wrote:
> On Tue, 24 Jun 2008, Erez Zilber wrote:
>
>> BTW - I'm currently running git-daemon in the following way:
>>
>> sudo git-daemon --base-path=/pub/git/ --export-all
>>
>> Is there any advantage to run it through xinetd? How do you run it?
>
> You probably want to run it from something that init runs, or you'll have
> to figure it out again when you reboot the server in a while. So you
> either want a suitable init script (Gentoo, for example, has one in their
> git package), or to run it through xinetd (which you almost certainly have
> an init script for).
>
> -Daniel
> *This .sig left intentionally blank*
>
Thanks. I was able to config xinetd, and everything seems to work now.
I would like to thank everyone here for the quick and very useful
help.
Erez
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2008-06-25 6:57 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-24 11:15 git-clone works with ssh but not with http/https/git Erez Zilber
2008-06-24 11:21 ` Matthias Kestenholz
2008-06-24 11:45 ` Erez Zilber
2008-06-24 11:48 ` Johannes Schindelin
2008-06-24 12:07 ` Erez Zilber
2008-06-24 12:25 ` Jakub Narebski
2008-06-24 13:42 ` Erez Zilber
2008-06-24 13:54 ` Anton Gladkov
2008-06-24 13:59 ` Anton Gladkov
2008-06-24 14:02 ` Matthias Kestenholz
2008-06-24 14:16 ` Erez Zilber
2008-06-24 18:58 ` Jakub Narebski
2008-06-24 14:05 ` Matthieu Moy
2008-06-24 12:41 ` Johannes Sixt
2008-06-24 12:35 ` Robert Haines
2008-06-24 13:53 ` Erez Zilber
2008-06-24 14:08 ` Robert Haines
2008-06-24 14:45 ` Erez Zilber
2008-06-24 17:10 ` Daniel Barkalow
2008-06-25 6:56 ` Erez Zilber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).