GIT錯誤:the remote end hung up unexpectedly

最近修改專案,新增了許多packages,然後加入Git 清單內,但是當要PUSH時,就發生如下錯誤訊息,
git小烏龜報錯如標題

Enumerating objects: 490, done.
Counting objects: 100% (381/381), done.
Delta compression using up to 12 threads
Compressing objects: 100% (288/288), done.
error: RPC failed; HTTP 400 curl 22 The requested URL returned error: 400
fatal: the remote end hung up unexpectedly
Writing objects: 100% (299/299), 7.85 MiB | 8.89 MiB/s, done.
Total 299 (delta 133), reused 16 (delta 1), pack-reused 0
fatal: the remote end hung up unexpectedly
Everything up-to-date

錯誤訊息說明
Enumerating objects, Counting objects, Compressing objects, Writing objectsGit 正在打包、壓縮準備送出,這邊一切正常
error: RPC failed; HTTP 400 curl 22Git client 嘗試用 HTTP POST 把資料送上 remote,結果遠端 server 回了 HTTP 400(Bad Request)
fatal: the remote end hung up unexpectedlyServer 端中途斷線,通常代表「資料包太大」、「逾時」、「伺服器不接受格式」

修改提交緩存區大小為5GB,或者更大的數字,該方式全域生效,一勞永逸

git config --global http.postBuffer 5242880000

參考資料:

git 推送出现 “fatal: The remote end hung up unexpectedly” 解决方案 - DomAndBom - 博客园
git 推送出现 ‘fatal: The remote end hung up unexpectedly’ 解决方案
Author image
關於 Richard Zheng
您已成功訂閱 Richard's NoteBook
歡迎回來!您已成功登入。
無法讓您登入。請再試一次。