Git常見錯誤整理

錯誤1:Git: fatal: The remote end hung up unexpectedly

解決辦法:

> git config --global http.postBuffer 1048576000
> git config --global http.postBuffer 1048576000

錯誤2:Git error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54

錯誤信息:

Total 116323 (delta 81906), reused 116320 (delta 81905)
POST git-receive-pack (130907163 bytes)
error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date

git 在 pull 或者 push 一個大項目時,可能會碰到出現如題所示的錯誤。

解決辦法:

網絡上往往都會說這是由於大文件造成的提交或者拉取失敗。但是,經過本人測試,如果是 errno 56,那麼應該是有大文件或者提交緩存方面的問題。而 errno 54 則不是這個問題。對於 56 錯誤的解決方式與網絡上大部分文章的一致。都是增大緩存配置,比如下面就是配置提交緩存爲 500M。

> git config http.postBuffer 524288000
> git config https.postBuffer 524288000

對於 errno 54 這個錯誤,經嘗試 http 或者 https 協議都無法正常提交。必須改爲 ssh 方式來提交代碼。也就是必須使用公私鑰的方式進行賬號驗證,並提交代碼。

Git配置SSH Key請參考 Git配置SSH Key

錯誤3:error:The branch ‘testing’ is not fully merged

解決辦法:強制刪除

# 普通刪除
git branch -d branch_name

# 強制刪除
git branch -D branch_name

錯誤4:fatal:multiple stage entries for merged file

rm .git/index
git add -A
git commit
歡迎訂閱「K叔區塊鏈」 - 專注於區塊鏈技術學習

博客地址:http://www.jouypub.com

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章