我在本地创建了一个 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 [email protected]:crwils/react_unit_and_cypresstesting.git (fetch)
origin [email protected]:crwils/react_unit_and_cypresstesting.git (push)
尝试增加 git 缓冲区大小:
git config --global http.postBuffer 157286400
基于此处发现的各种其他类似问题/解决方案,我也尝试过:
这种情况刚刚开始发生在一些现有的和新的存储库中,但其他存储库则没有,没有明显的主题。
有人可以帮忙吗?
首先检查使用 HTTPS 而不是 SSH 是否可行:这将隔离 SSH 端口 22 上的问题。
cd /path/to/react_unit_and_cypresstesting
git remote set-url https://github.com/crwils/react_unit_and_cypresstesting.git
git push
您必须输入 GitHub 用户名/密码,但它们可以缓存在凭证助手中。
唯一的解决方案是首先使用 HTTPS,然后切换到 SSL,例如
git remote set-url origin [HTTPS: https://github.com/username/your-repo-name]
git remote set-url origin [SSH: [email protected]:username/your-repo-name]
我已经在多个版本的 Windows 上经历了这个铃声。它只发生在我的笔记本电脑上,并且通过 WiFi 进行。在尝试了 stackoverflow 上的每个命令行解决方案后,我发现唯一可行的解决方案是找出您的确切无线卡型号,并为其下载最新的驱动程序。在尝试之前卸载设备并删除原始驱动程序。
祝你好运!