Ghoughpteighbteau
Ghoughpteighbteau

Reputation: 86

msysGit daemon doesn't reliably clone from

We have 4 computers on a lan, and we would like to pull from each other directly, rather than from a central repository.

msysGit (v1.8.0.msysgit.0) has being installed with stock options, and I'm running the daemon with this command:

"C:\Program Files (x86)\Git\bin\git.exe" daemon --reuseaddr --base-path="C:\Users\SmartUserPerson\repos" --verbose

The problem persists even with port 9418 open in windows firewall, and with it completely disabled. All machines are using msysGit as the client.

Here's a log of me repeatedly cloning from this daemon using msysGit on the same computer.

SmartUserPerson@MY-PC-1 ~/projects/test
$ git clone git://MY-PC-1/spire-web
Cloning into 'spire-web'...
remote: Counting objects: 1294, done.
remote: Compressing objects:  64% (393/614)   Receiving objects:   0% (1/1294)
...
remote: Compressing objects:  99% (608/614)   Receiving objects:  11% (143/1294)
remote: Compressing objects: 100% (614/614), done.
remote: Total 1294 (delta 529), reused 1188 (delta 441)
Receiving objects: 100% (1294/1294), 571.75 KiB, done.
Resolving deltas: 100% (529/529), done.

SmartUserPerson@MY-PC-1 ~/projects/test
$ rm -rf spire-web/

SmartUserPerson@MY-PC-1 ~/projects/test
$ git clone git://MY-PC-1/spire-web
Cloning into 'spire-web'...
remote: Counting objects: 1294, done.
remote: Compressing objects:  43% (265/614)   Receiving objects:   0% (1/1294)
...
remote: Compressing objects:  98% (602/614)   Receiving objects:  17% (220/1294)
remote: Compressing objects: 100% (614/614), done.
remote: Total 1294 (delta 529), reused 1188 (delta 441)
Receiving objects: 100% (1294/1294), 571.75 KiB, done.
Resolving deltas: 100% (529/529), done.

SmartUserPerson@MY-PC-1 ~/projects/test
$ rm -rf spire-web/

SmartUserPerson@MY-PC-1 ~/projects/test
$ git clone git://MY-PC-1/spire-web
Cloning into 'spire-web'...
remote: Counting objects: 1294, done.
remote: Compressing objects:  73% (449/614)   Receiving objects:   0% (1/1294)
...
remote: Compressing objects: 100% (614/614), done. eceiving objects:   8% (104/1
294)
remote: Total 1294 (delta 529), reused 1188 (delta 441)
fatal: read error: Invalid argument
Receiving objects: 100% (1294/1294), 571.75 KiB, done.
fatal: early EOF
fatal: index-pack failed

SmartUserPerson@MY-PC-1 ~/projects/test
$ rm -rf spire-web/

SmartUserPerson@MY-PC-1 ~/projects/test
$ git clone git://MY-PC-1/spire-web
Cloning into 'spire-web'...
remote: Counting objects: 1294, done.
remote: Compressing objects:  70% (430/614)   eceiving objects:   0% (1/1294)
...
remote: Compressing objects:  99% (608/614)   Receiving objects:   8% (104/1294)
remote: Compressing objects: 100% (614/614), done.
fatal: read error: Invalid argument
fatal: early EOFs:  96% (1243/1294)
fatal: index-pack failed

SmartUserPerson@MY-PC-1 ~/projects/test
$ rm -rf spire-web/

SmartUserPerson@MY-PC-1 ~/projects/test
$ git clone git://MY-PC-1/spire-web
Cloning into 'spire-web'...
remote: Counting objects: 1294, done.
remote: Compressing objects:  48% (295/614)   Receiving objects:   0% (1/1294)
...
remote: Compressing objects: 100% (614/614), done.
rRemote: Total 1294 (delta 529), reused 1188 (delta 441)eceiving objects:  88% (
R
fatal: read error: Invalid argument
fatal: early EOFs:  96% (1243/1294)
fatal: index-pack failed

SmartUserPerson@MY-PC-1 ~/projects/test
$ rm -rf spire-web/

SmartUserPerson@MY-PC-1 ~/projects/test
$ git clone git://MY-PC-1/spire-web
Cloning into 'spire-web'...
remote: Counting objects: 1294, done.
remote: Compressing objects:  43% (265/614)   Receiving objects:   0% (1/1294)
...
remote: Compressing objects: 100% (614/614), done.
fatal: read error: Invalid argument
fatal: early EOFs:  96% (1243/1294)
fatal: index-pack failed

SmartUserPerson@MY-PC-1 ~/projects/test
$ rm -rf spire-web/

SmartUserPerson@MY-PC-1 ~/projects/test
$ git clone git://MY-PC-1/spire-web
Cloning into 'spire-web'...
remote: Counting objects: 1294, done.
remote: Compressing objects:  75% (461/614)   Receiving objects:   0% (1/1294)
...
remote: Compressing objects: 100% (614/614), done.
remote: Total 1294 (delta 529), reused 1188 (delta 441)
Receiving objects: 100% (1294/1294), 571.75 KiB, done.
Resolving deltas: 100% (529/529), done.

SmartUserPerson@MY-PC-1 ~/projects/test
$ rm -rf spire-web/

SmartUserPerson@MY-PC-1 ~/projects/test
$ git clone git://MY-PC-1/spire-web
Cloning into 'spire-web'...
remote: Counting objects: 1294, done.
remote: Compressing objects:  68% (418/614)    eceiving objects:   0% (1/1294)
...
remote: Compressing objects: 100% (614/614), done.R
atal: read error: Invalid argument4)
Receiving objects: 100% (1294/1294), 571.75 KiB, done.
fatal: early EOF
fatal: index-pack failed

SmartUserPerson@MY-PC-1 ~/projects/test

Cloning from this daemon fails 50% of the time! how the heck do I fix this?

Oh and here is the output from the daemon during these tests

[4572] Connection from [aaaa::aaaa:aaaa:aaaa:aaa]:62613
[4572] Extended attributes (17 bytes) exist <host=my-pc-1>
[4572] Request upload-pack for '/spire-web'
[1996] [4572] Disconnected
[6108] Connection from [aaaa::aaaa:aaaa:aaaa:aaa]:62860
[6108] Extended attributes (17 bytes) exist <host=my-pc-1>
[6108] Request upload-pack for '/spire-web'
[1996] [6108] Disconnected
[4960] Connection from [aaaa::aaaa:aaaa:aaaa:aaa]:62870
[4960] Extended attributes (17 bytes) exist <host=my-pc-1>
[4960] Request upload-pack for '/spire-web'
[1996] [4960] Disconnected
[988] Connection from [aaaa::aaaa:aaaa:aaaa:aaa]:62871
[988] Extended attributes (17 bytes) exist <host=my-pc-1>
[988] Request upload-pack for '/spire-web'
[1996] [988] Disconnected
[6816] Connection from [aaaa::aaaa:aaaa:aaaa:aaa]:62872
[6816] Extended attributes (17 bytes) exist <host=my-pc-1>
[6816] Request upload-pack for '/spire-web'
[1996] [6816] Disconnected
[3204] Connection from [aaaa::aaaa:aaaa:aaaa:aaa]:62874
[3204] Extended attributes (17 bytes) exist <host=my-pc-1>
[3204] Request upload-pack for '/spire-web'
[1996] [3204] Disconnected
[5532] Connection from [aaaa::aaaa:aaaa:aaaa:aaa]:62875
[5532] Extended attributes (17 bytes) exist <host=my-pc-1>
[5532] Request upload-pack for '/spire-web'
[1996] [5532] Disconnected
[6536] Connection from [aaaa::aaaa:aaaa:aaaa:aaa]:62880
[6536] Extended attributes (17 bytes) exist <host=my-pc-1>
[6536] Request upload-pack for '/spire-web'

Upvotes: 1

Views: 655

Answers (1)

Tony Hoyle
Tony Hoyle

Reputation: 11

This is a longstanding bug on git-daemon on windows (related to msysgit issue 457 I think). There is one workaround I'm aware of, and it's a rather bizarre one..

Open git-daemon on the terminal. Select some text, leave it selected.

That freezes the terminal output, and allows git to run cleanly. No idea why this works, and it's not a practical long term fix.

Ultimately the only practical fix I've found so far is to run git-daemon on a linux server instead, until the bug is fixed (which it looks like it will never be, given the time elapsed since it was first reported).

Upvotes: 1

Related Questions