AkiraXue / git-osx-installer

Automatically exported from code.google.com/p/git-osx-installer
0 stars 0 forks source link

git daemon fails with IP addresses but not host names #26

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. create a git repository
2. run git daemon --base-path=<git path> --verbose --export-all
3. on the same machine run git clone git://localhost/<git repository name>
- works as expected
4. on the same machine run git clone git://127.0.0.1/<git repository name>
- fails with disconnection

What is the expected output? What do you see instead?
Expected to get a clone of the repository - instead got 
  fatal: The remote end hung up unexpectedly

And on the daemon end:
 [11374] [11756] Disconnected (with error)

What version of the product are you using? On what operating system?
git version 1.6.1.2 on Leopard 10.5.6

Please provide any additional information below.
Reproduced on two Macs. 

If you add a hostname to the machine (editing /etc/hosts) and use that
hostname ot reference the IP everything works. If you try any ip address
that is bound to the machine (127.0.0.1 or the locally assigned eth0
address) it appears to fail.

Original issue reported on code.google.com by dabeeeen...@gmail.com on 6 Feb 2009 at 11:12

GoogleCodeExporter commented 8 years ago
A member of the git irc channel tried to recreate this in Linux on the same 
version
of git but was unable to recreate...

Original comment by dabeeeen...@gmail.com on 6 Feb 2009 at 11:16

GoogleCodeExporter commented 8 years ago
I have the same issue on OS X 10.5.6 client with git version 1.6.1.3 and Redhat
Enterprise Linux 5 server with git version 1.6.1.3.

Also, same issue on CentOS client with git client version 1.5.2.1.

Output:

[root@app2 git]# sudo -u git git daemon --base-path=/var/git/ --export-all 
--verbose 
[27167] Connection from xx.xx.xx.xx:55749
[27167] Extended attributes (22 bytes) exist <host=xx.xx.xx.xx>
[27167] Request upload-pack for '/gcxauthzpdp.git'
[27162] [27167] Disconnected (with error)

Original comment by acalo...@gmail.com on 19 Feb 2009 at 3:19

GoogleCodeExporter commented 8 years ago
Also, the title of this should be updated, as it fails when I connect to the git
daemon remotely using the IP address and the hostname of the machine.   

Original comment by acalo...@gmail.com on 19 Feb 2009 at 3:26

GoogleCodeExporter commented 8 years ago
I don't pretend to know the cause yet, but I've identified at least part of the
process where things go wrong.  Keep in mind, my git was compiled from source, 
I did
not install the binary, so I'm sure this behavior has something to do with that 
fact.

There is a distinct difference apparently between 'git daemon' and
'/usr/local/libexec/git-core/git-daemon'   After running the daemon with the 
full
path to the daemon executable the problem went away.

Original comment by acalo...@gmail.com on 19 Feb 2009 at 4:50

GoogleCodeExporter commented 8 years ago
Is this still a problem? I have tested it with the latest git and I can clone 
from both 127.0.0.1 and localhost.

Original comment by timchar...@gmail.com on 9 Dec 2010 at 10:31

GoogleCodeExporter commented 8 years ago
Yep - this is fixed in git version 1.7.3.2

Original comment by b...@solidstategroup.com on 10 Dec 2010 at 11:31