最近在使用git更新代码或者clone代码的时候会遇到错误如下:
Enter passphrase for key '***':
remote: Counting objects: 37, done.
packet_write_wait: Connection to *.*.*.* port **: Broken pipe
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: unpack-objects failed
主要原因要么是缓存不够,要么是网络不行,可通过如下配置解决:
# 修改全局提交缓存大小
git config --global http.postBuffer 524288000
# 修改全局下载最低速度以及对应的最长时间
git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 999999
如果有遇到这些问题可以尝试一下。