Can't connect to any repository: xxxxxx Error writing request body to server

时间:2024-04-15 17:47:28

今天在git提交代码时一直报如下错误:

Can't connect to any repository: https://gitee.com/xxxxxx(https://gitee.com/xxxx: Error writing request body to server)

后来经过谷歌发现是git默认的post缓存为1M,当项目过大时,就会出现问题。

解决方案:

一、gitBash修改

#增加为 500MB

git config http.postBuffer 524288000
二、eclipse Git插件修改
   Window -> Preferences 中找到 Team -> Git -> Configuration 配置界面,在System Settings Tab页中 点击 “Add Entry…” 按钮来添加一个配置项:
   key为: http.postBuffer
value为:524288000