【问题标题】:Git push error: the remote end hung up unexpectedly [duplicate]Git推送错误:远程端意外挂断[重复]
【发布时间】:2021-12-28 23:19:54
【问题描述】:

我推送了两个提交更改,结果我不得不拉取同事所做的一些更改。当我尝试推送时,出现此错误:

>>> /usr/bin/git push origin HEAD:refs/heads/main
error: RPC failed; curl 55 Failed sending data to the peer
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
Everything up-to-date

我尝试过但没有成功的解决方案:

git config --global http.postBuffer 524288000
git config --global http.version HTTP/1.1

【问题讨论】:

    标签: bash git


    【解决方案1】:

    尝试这样做

    1. 从您的项目中删除 .git/
    2. 将远程repo 克隆到某个新位置,例如您的桌面:

    3.git clone https://github.com/foo/bar.git

    4.将 .git/ 从新位置移动到旧位置 重新提交并推送您的更改

    【讨论】:

      猜你喜欢
      • 2019-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-04-23
      • 2013-02-20
      • 1970-01-01
      • 2012-08-19
      相关资源
      最近更新 更多