我在本地创建了一个Git仓库。当我尝试推送到GitHub时,出现以下错误:
Warning: Permanently added the RSA host key for IP address '140.82.112.4' to the list of known hosts.
Enumerating objects: 47, done.
Counting objects: 100% (47/47), done.
Delta compression using up to 8 threads
Compressing objects: 100% (39/39), done.
Writing objects: 100% (47/47), 756.22 KiB | 9.11 MiB/s, done.
Total 47 (delta 7), reused 0 (delta 0), pack-reused 0
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
client_loop: send disconnect: Broken pipe
当我运行 git remote -v 命令时:
origin git@github.com:crwils/react_unit_and_cypresstesting.git (fetch)
origin git@github.com:crwils/react_unit_and_cypresstesting.git (push)
尝试增加git缓冲区大小:
git config --global http.postBuffer 157286400
参考其他类似问题/解决方案,在这里,我也尝试了以下几种方法:
- git repack
- 删除并创建新的SSH密钥
- 删除.git文件并重新初始化仓库,然后推送
- 删除.git文件,将所有文件移动到新文件夹中,在本地初始化一个新的仓库,然后推送到github上的新远程仓库
- 更换不同的互联网连接
这种情况刚开始发生在一些现有的仓库和新的仓库中,但是对于其他仓库则没有出现过,没有明显的主题。
有人可以帮忙吗?
http.postbuffer
对 SSH 没有影响,除非您确定需要它,否则不应使用。当它修复问题时,这表明远程服务器或您的网络不符合1999年编写的标准,应进行修复。 - bk2204