- 故障现象
git pull报错
$ git push
Counting objects: 40, done.
Delta compression using up to 32 threads.
Compressing objects: 100% (38/38), done.
fatal: protocol error: bad line length 8192 47.18 MiB/s
fatal: sha1 file '<stdout>' write error: Broken pipe
error: failed to push some refs to 'https://gitlab.xxx.com/liuym/biji.git'
- 解决方法
设置 http.postBuffer
$ git config --global http.postBuffer 524288000
$ git push
Counting objects: 40, done.
Delta compression using up to 32 threads.
Compressing objects: 100% (38/38), done.
Writing objects: 100% (40/40), 2.30 GiB | 1.08 MiB/s, done.
Total 40 (delta 11), reused 0 (delta 0)
To https://gitlab.xxx.com/liuym/biji.gitba7327c..ec4c7fa main -> main
注意: 值不能设置的太大,比如多加一个0,否则还是报错