問題描述:
某天上午來了公司拉取新代碼git pull,報錯:
remote: Enumerating objects: 9284, done. remote: Counting objects: 100% (9284/9284), done. remote: Compressing objects: 100% (6544/6544), done. error: RPC failed; curl 18 transfer closed with outstanding read data remaining error: 7673 bytes of body are still expected fetch-pack: unexpected disconnect while reading sideband packet fatal: early EOF fatal: fetch-pack: invalid index-pack output
處理過程:
從網上查詢試過很多辦法,比如:
步驟1:因為curl的postBuffer的默認值太小,我們需要調整它的大小,我設置成500M,甚至設置成更大,但是沒有效果。
git config --global http.postBuffer 524288000
步驟2:實在沒辦法了,蠢方法1,刪除了項目重新clone,結果不行,clone不下來,報一樣的錯。
步驟3:蠢方法2,又重新安裝了下git,也不好使。
步驟4:從stackoverflow看到的處理方法,但是在第一行命令就失敗了,gameover.
git clone http://github.com/large-repository --depth 1 cd large-repository git fetch --unshallow
步驟5:到現在已經快崩潰,放棄了掙扎,想着下載ZIP包,然后再關聯(公司自己搭建的gitlab)。結果下載ZIP失敗,顯示網絡錯誤,到這我就知道是服務器的問題了。去找運維查了下,發現服務器內存滿了(mmp~)。增加了內存,好了。