【问题标题】:git pull and fetch fail with "fatal: The remote end hung up unexpectedly"git pull 和 fetch 失败并显示“致命:远程端意外挂断”
【发布时间】:2011-05-14 19:55:18
【问题描述】:

来自 Win7 上的 cygwin git,我正在尝试与我的 linux 工作站协调。两者都是从同一个上游存储库克隆的。首先我执行“git fetch origin”,然后尝试从我的工作站获取。

$ git fetch origin
[... all ok ...]
$ git fetch b
scheib@b's password:
remote: Counting objects: 2031, done.
remote: Compressing objects: 100% (512/512), done.
fatal: The remote end hung up unexpectedly
fatal: early EOFs:  23% (182/789)
fatal: index-pack failed

【问题讨论】:

标签: git cygwin


【解决方案1】:

Cygwin 的 ssh.exe 有这个错误。用 msysgit 安装的 ssh.exe 替换 cygwin 的 ssh.exe,这个问题就会消失。

相关:Git fatal: remote end hung up

【讨论】:

  • Stack Overflow 使用任务/答案格式,而不是线程对话格式。每个“答案”都应该一个答案。
  • 是的,更好。此外,看看编辑历史,我可能一开始就太苛刻了。对此感到抱歉。
【解决方案2】:

您是如何创建密钥的?

使用 cygwin 的 git 还是使用 git bash 中的 mingw git?

我相信真正的问题是 cygwin 的 ssh 在 /home/name/.ssh 中寻找 .ssh 而 mingw 的 git ssh 在 c:/user/name/.ssh

您的密钥很有可能在这些目录中的一个且只有一个中。

您可以尝试使用 -i 开关告诉 cygwin 的 .ssh 使用不同的身份文件,或者将密钥移动到两个目录中,或者在 /home/name/ 中创建一个 ssh 配置文件。 ssh/配置。

我创建了一个配置,其中包含:

Host github.com
    User jerryasher
    Hostname github.com
    IdentityFile c:/Users/jerry/.ssh/id_rsa

鉴于我可以使用来自 git bash 的 mingw git 或来自 rxvt 的 cygwin 的 git 与 github 交互。

【讨论】:

  • 如果键是问题,它将无法连接
猜你喜欢
  • 2018-03-11
  • 2021-08-02
  • 2013-02-20
  • 1970-01-01
  • 2012-06-08
  • 2011-05-04
  • 1970-01-01
  • 2012-09-18
相关资源
最近更新 更多