1. 程式人生 > >git fatal: The remote end hung up unexpectedly錯誤解決方法

git fatal: The remote end hung up unexpectedly錯誤解決方法

在使用git更新或提交專案時候出現 "fatal: The remote end hung up unexpectedly " 原因是推送的檔案太大。

那就簡單了,要麼是快取不夠,要麼是網路不行,要麼牆的原因

特別是資源庫在國外的情況下。此問題可能由網路原因引起。

方法一:

修改提交快取大小為500M,或者更大的數字

git config --global http.postBuffer 524288000

# some comments below report having to double the value:

git config --global http.postBuffer 1048576000

或者在克隆/建立版本庫生成的 .git目錄下面修改生成的config檔案增加如下:

[http]  
postBuffer = 524288000

修改如下:

然後重新推送。

方法二:

配置git的最低速度和最低速度時間:

git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 999999  單位 秒
--global配置對當前使用者生效,如果需要對所有使用者生效,則用--system

方法三:
fatal: The remote end hung up unexpectedlyB | 2.00 KiB/s

我的是這樣的,後面帶| 2.00KiB/s  

這句顯示 遠端結束掛起 |2KiB/s

應該是牆的原因導致網速太慢,且專案