【轉】[git]error: pack-objects died of signal


現象:

git clone 或是 git pull的時候會出錯,error 大概如下

remote: Enumerating objects: 7433, done.
remote: Counting objects: 100% (7433/7433), done.
error: pack-objects died of signal 993/3835)   
error: git upload-pack: git-pack-objects died with error.
fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
remote: aborting due to possible repository corruption on the remote side.
fatal: protocol error: bad pack header

 

分析:

因為要clone的代碼多達8,  10個G,在加上里面的分支以及歷史太多。

因此直接用git clone 命令去克隆的時候經常導致服務端內存爆滿,clone不下來。

 

解決方法:

git clone  git@xxx/xxxxxx.git

git clone 不下來,加一個  --depth=1 的參數, 這個參數會只下載最近一次的提交記錄。

如果不需要去關注以前的版本,可以只clone最新的版本,使用如下命令:

git clone  --depth=1 git@xxx/xxxxxx.git
---------------------
作者:champwang
來源:CSDN
原文:https://blog.csdn.net/champwang/article/details/85523349
版權聲明:本文為博主原創文章,轉載請附上博文鏈接!

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM