Friday, June 15, 2018

Git: The remote end hung up unexpectedly

今天用git push時出現
$ git push
Counting objects: 40, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (35/35), done.
error: RPC failed; curl 56 Recv failure: Connection was reset
fatal: The remote end hung up unexpectedly
Writing objects: 100% (40/40), 1.65 MiB | 1.45 MiB/s, done.
Total 40 (delta 11), reused 0 (delta 0)
fatal: The remote end hung up unexpectedly
Everything up-to-date

查找了一下發現原因是上傳時的文件太大導致不允許上傳。
找了一下知道了解決方案︰
  1. 在.git目錄下有一個config文件,打開它。
  2. 在後面加上
    • [http]
    • postBuffer = 524288000
  3. 完成
Reference: git 推送出现 "fatal: The remote end hung up unexpectedly" 解决方案

或者可以用Bash輸入
git config --global http.postBuffer 157286400

No comments: