fatal: The remote end hung up unexpectedly
上傳一份代碼的時候,出現了這個錯誤,然后就沒有成功上傳.
背景操作
主要是進行svn轉換到git時候出錯的,轉換的代碼比較簡單,三行就可以解決.當然,web端的項目要事先准備好.
git svn clone svn://xxxxx
git remote add origin git@github.com/xxx/xxx.git
git push -u origin master
出錯發生
本來還算順利的,有三個項目,前面兩個成功了,但是第三個時候,有文件比較大,導致錯誤,沒有上傳成功,具體報錯如下:
Counting objects: 61350, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (20587/20587), done.
efatal: The remote end hung up unexpecterror: RPC failed; HTTP 413 curl 22 The requested U
RL returned error: 413 Request Entity Too Large
dly
Writing objects: 100% (61350/61350), 4.32 GiB | 657.00 KiB/s, done.
Total 61350 (delta 39636), reused 59367 (delta 37653)
fatal: The remote end hung up unexpectedly
Everything up-to-date
看到這個的初步感覺是有文件太大無法上傳,百度之后找到一個解決方案,直接在配置文件中添加參數即可.
- windows:
在 .git/config 文件中加入
[http]
postBuffer = 524288000
- linux:
git config http.postBuffer 524288000
分析
目前是成功解決問題了,根據錯誤,這個是明顯的文件過大導致的上傳失敗了,我實際更改的時候是直接更改的1g了.
算是成功解決問題.
看到還有用git命令直接修改的,由於一次就成功了,就沒有再重新嘗試一下修改之后能夠行得通了,后面遇到再試了.
參考的博客
- Git中push時出現錯誤fatal: The remote end hung up unexpectedly - 行者小朱的博客 - CSDN博客
http://blog.csdn.net/u012050154/article/details/54605256 - 解決RPC failed; HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large問題 - 飛魚君 - 博客園
https://www.cnblogs.com/feiyujun/p/7755764.html