VISUAL STDIO git推送“try increasing http.postBuffer”报错处理
本文最后更新于 196 天前,其中的信息可能已经有所发展或是发生改变。

问题发生过程

在VISUAL STDIO 中执行git将库推送远端服务器报出以下故障(windows版本的 VISUAL STDIO)

未能推送到远程仓库。请参见输出窗口了解更多详细信息。
已在仓库 C:\Users\q2019715\Source\Repos\example 中本地创建提交 29b45e0e
正在推送 main
Enumerating objects: 20, done.
Delta compression using up to 4 threads
Total 15 (delta 6), reused 0 (delta 0), pack-reused 0
Error: unable to rewind rpc post data - try increasing http.postBuffer
Error: RPC failed; curl 65 HTTP/2 stream 7 was reset
send-pack: unexpected disconnect while reading sideband packet
发布到远程仓库时遇到错误: Git failed with a fatal error.
Git failed with a fatal error.
the remote end hung up unexpectedly
Everything up-to-date

解决方案

通过查看报错信息,错误原因在于缓冲区大小过小,只需要调整http.postBuffer的大小就可以了

调节方法:

打开终端,输入以下的代码即可修改

git config --global http.postBuffer 20480000

执行完之后重启一下VISUAL STDIO,问题解决。

本博客所有文章除特别声明外,均采用 CC BY-NC-SA 3.0 许可协议,记得载明出处,(期待)。内容有问题?点此反馈
上一篇
下一篇