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
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/
On Tue, Jun 24, 2008 at 2:21 PM, Matthias Kestenholz [off-list ref] wrote:
On Tue, 2008-06-24 at 14:15 +0300, Erez Zilber wrote:
quoted
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?
quoted
[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?
quoted
[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
From: Johannes Schindelin <hidden> Date: 2016-06-15 22:44:49
Hi,
On Tue, 24 Jun 2008, Erez Zilber wrote:
On Tue, Jun 24, 2008 at 2:21 PM, Matthias Kestenholz [off-list ref] wrote:
quoted
On Tue, 2008-06-24 at 14:15 +0300, Erez Zilber wrote:
quoted
[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
On Tue, Jun 24, 2008 at 2:48 PM, Johannes Schindelin
[off-list ref] wrote:
Hi,
On Tue, 24 Jun 2008, Erez Zilber wrote:
quoted
On Tue, Jun 24, 2008 at 2:21 PM, Matthias Kestenholz [off-list ref] wrote:
quoted
On Tue, 2008-06-24 at 14:15 +0300, Erez Zilber wrote:
quoted
[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
From: Jakub Narebski <hidden> Date: 2016-06-15 22:44:49
"Erez Zilber" [off-list ref] 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
From: Robert Haines <hidden> Date: 2016-06-15 22:44:49
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
From: Johannes Sixt <hidden> Date: 2016-06-15 22:44:49
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
On Tue, Jun 24, 2008 at 3:25 PM, Jakub Narebski [off-list ref] wrote:
"Erez Zilber" [off-list ref] writes:
quoted
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
[...]
quoted
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
On Tue, Jun 24, 2008 at 3:35 PM, Robert Haines [off-list ref] wrote:
quoted
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
From: Anton Gladkov <hidden> Date: 2016-06-15 22:44:49
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
From: Anton Gladkov <hidden> Date: 2016-06-15 22:44:49
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:
quoted
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
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:
quoted
On Tue, Jun 24, 2008 at 05:42:14PM +0400, Erez Zilber wrote:
quoted
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/
From: Robert Haines <hidden> Date: 2016-06-15 22:44:49
quoted
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
On Tue, Jun 24, 2008 at 4:54 PM, Anton Gladkov [off-list ref] wrote:
On Tue, Jun 24, 2008 at 05:42:14PM +0400, Erez Zilber wrote:
quoted
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
On Tue, Jun 24, 2008 at 5:08 PM, Robert Haines [off-list ref] wrote:
quoted
quoted
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.
quoted
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
From: Daniel Barkalow <hidden> Date: 2016-06-15 22:44:49
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*
From: Jakub Narebski <hidden> Date: 2016-06-15 22:44:49
On Tue, 24 Jun 2008, Anton Gladkov wrote:
On Tue, Jun 24, 2008 at 05:42:14PM +0400, Erez Zilber wrote:
quoted
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
On Tue, Jun 24, 2008 at 8:10 PM, Daniel Barkalow [off-list ref] wrote:
On Tue, 24 Jun 2008, Erez Zilber wrote:
quoted
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