原因文件太大
git config --global core.compression -1
git config --global http.postBuffer 1048576000
compression 是压缩的意思,从 clone 的终端输出就知道,服务器会压缩目标文件,然后传输到客户端,客户端再解压。取值为 [-1, 9],-1 以 zlib 为默认压缩库,0 表示不进行压缩,1…9 是压缩速度与最终获得文件大小的不同程度的权衡,数字越大,压缩越慢,当然得到的文件会越小。
将http.postBuffer设置的尽量大,例如git config --global http.postBuffer 524288000 (500M)
git config --global http.postBuffer 1048576000 (1G)。再大的应该是依次类推吧
因为下载的时候不止是工程数据,还有其它配置数据,总量会大于工程数据量,所以设置的缓存大小一定要比工程大小多一些。
创建ssh-key下载
默认已经装好了git
ssh-keygen -t rsa -C "你的邮箱地址"
然后直接三次回车
cat ~/.ssh/id_rsa.pub
然后直接复制里面的所有的内容
C:\Users\Administrator\.ssh\id_rsa.pub
打开github设置ssh-key的地址
title随便写
key里面粘贴进去上面复制的
error: git upload-pack: git-pack-objects died with error
fetal: git upload-pack: aborting due to possible repository corruption on the remote side.
remote: aborting due to possible repository corruption on the remote side
fetal: early EOF
fetal: index-pack failed
在git的客户端设置
git config --global pack.windowMemory "100m"
git config --global pack.SizeLimit "100m"
git config --global pack.threads "1"
git config --global pack.window "0"