【问题标题】:Git for windows: fatal: early EOF适用于 Windows 的 Git:致命:早期 EOF
【发布时间】:2016-04-10 16:32:43
【问题描述】:

昨天我安装了一个新的 Git windows server 2.6.4,它在 Mac git 客户端(git 协议)上运行良好

今天我正在努力让第二个客户端 (Windows 7) 工作。在尝试使其工作的过程中,我已将 Windows 服务器和客户端都升级到最近发布的 git 2.7.0

我尝试禁用压缩...我尝试了无线和有线网络(Windows 客户端和服务器位于同一张桌子上)。我在客户端上禁用了 AV。我已尝试按照建议 here

调整内存设置

这是客户端输出:

bash> git clone git://server.fqdn/repo.git 克隆到“回购”... 远程:08:56:10.972997 git.c:348 跟踪:内置:git 'pack-objects' '--revs' '--thin' '--stdout' '--progress' '--delta-base -抵消' 远程:计数对象:76,完成。 远程:压缩对象:100% (38/38),完成。 接收对象:100% (76/76), 8.31 KiB | 0 字节/秒,完成。 致命:读取错误:无效参数 致命:早期EOF 致命:索引包失败 重击>

这是服务器输出:

bash> ./gitd.bat D:\tools\gitd>设置 GIT_TRACE=1 D:\tools\gitd>D:\tools\Git\bin\git.exe 守护进程 --reuseaddr --verbose --base-path=D:\git --export-all --enable=receive-pack 08:59:49.023778 git.c:561 跟踪:执行:'git-daemon''--reuseaddr''--verbose''--base-path=D:\git''--export-all''- -启用=接收包' 08:59:49.023778 run-command.c:343 跟踪:run_command: 'git-daemon' '--reuseaddr' '--verbose' '--base-path=D:\git' '--export-all' '--enable=receive-pack' [7376] 准备隆隆声 09:00:03.056268 run-command.c:343 跟踪:run_command:'D:\tools\Git\mingw64\libexec\git-core\git-daemon.exe''--serve''--reuseaddr''- -verbose' '--base-path=D:\git' '--export-all' '--enable=receive-pack' [6492] 连接从 10...:54729 [6492] 存在扩展属性(27 个字节) [6492] 为“/repo.git”请求上传包 09:00:03.087469 run-command.c:343 trace: run_command: 'upload-pack' '--strict' '--timeout=0' '.' [6492] 09:00:03.134269 git.c:561 跟踪:执行:'git-upload-pack''--strict''--timeout=0''。 [6492] 09:00:03.134269 run-command.c:343 跟踪:run_command:'git-upload-pack''--strict''--timeout=0''。 [6492] 09:00:03.617872 run-command.c:343 跟踪:run_command:'pack-objects''--revs''--thin''--stdout''--progress''--delta-base -抵消'

我还能尝试什么?

【问题讨论】:

  • 我放弃了,改用ssh协议

标签: windows git


【解决方案1】:

已知 Git 守护程序仅在选择某些文本时才能在 Windows 上运行 在 git daemon 的控制台窗口中(例如,参见 git clone fails with "index-pack" failed?)。 此文本选择延迟了守护程序的输出,这在某种程度上有所帮助(!)。作为 清除文本选择后(使用 Escape 键),克隆/获取 大部分时间都失败了。再次选择文本,然后克隆/获取简历 去工作。使用 git 在 Windows 10 上可以轻松重现该问题 2.11.0.windows.1 通过本地克隆 git clone git://127.0.0.1/my-repo.

【讨论】:

  • 天哪!这为我修好了。但这是怎么“知道”的呢?
  • @AyCe,这些知识记录在 Martin 对“git clone failed with "index-pack" failed?”的回答中。问题(请参阅我的答案中的链接)。我不知道马丁是如何设法找到这种解决方法的。此外,这些知识记录在git-for-windows issue #304: Investigate git daemon problems
【解决方案2】:

我找到了另一个解决方案,只启动 **git-daemon.exe directly** 例如
对于 64 位 git:
"C:\Program Files\Git\mingw64\libexec\git-core\git-daemon.exe"

--> 与 git.exe 具有相同的参数
然后它可以在没有选择文本的情况下工作。

【讨论】:

    猜你喜欢
    • 2011-01-31
    • 2015-03-25
    • 2014-02-12
    • 2017-05-26
    • 2020-04-08
    • 1970-01-01
    • 2013-09-04
    • 2012-05-22
    • 2013-08-16
    相关资源
    最近更新 更多