msysGit守护程序无法可靠地克隆

时间:2013-01-28 22:24:59

标签: windows git clone msysgit

我们在局域网上有4台计算机,我们希望直接相互拉取,而不是从中央存储库中拉出来。

msysGit(v1.8.0.msysgit.0)已安装了股票期权,我正在使用此命令运行守护程序:

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

即使端口9418在Windows防火墙中打开,并且完全禁用它,问题仍然存在。所有机器都使用msysGit作为客户端。

这是我在同一台计算机上使用msysGit从此守护程序反复克隆的日志。

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

从这个守护进程克隆失败50%的时间! 我怎么解决这个问题?

哦,这是测试期间守护进程的输出

[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'

1 个答案:

答案 0 :(得分:1)

这是Windows上git-daemon的一个长期存在的错误(我认为与msysgit问题457相关)。我知道有一种解决方法,这是一个相当奇怪的解决方案..

在终端上打开git-daemon。选择一些文字,保持选中状态。

冻结终端输出,并允许git干净地运行。不知道为什么会这样,而且这不是一个实际的长期修复。

最终我到目前为止找到的唯一实用修复是在linux服务器上运行git-daemon,直到bug被修复(看起来它永远不会出现,因为它是自第一次报告以来经过的时间)。