SolveProblem:Git 遇到了early EOF index-pack failed问题
Problem:
- git clone fails with "index-pack" failed?
-
Git
checking out problem
-
[fatal:
early EOFs]
1)git config --global --add core.compression -1
-------------------------------------------------------------------
Compression is the meaning of the compression, and the server will compress the target file and transfer to the client,then extract it.
If we set the value between [-1,9], the -1 means compress default method, the 0 means non-compression.
The more bigger the value the slower the compression process while with the more little files.
-------------------------------------------------------------------
2)Because the file in github is too larger, so we could use ssh to replace the http.
<1>First, open the github page
profile setting -> to the ssh keys.
<2>Second,according to the page statements like following:
-------------------------------------------------------------------
SSH key allows you to establish a secure connection between your computer and GitLab
Before generating an SSH key, check if your system already has one by running
cat ~/.ssh/id_rsa.pub
If your see a long string starting with ssh-rsa
orssh-dsa
, you can skip the ssh-keygen step.
To generate a new SSH key just open your terminal and use code below. The ssh-keygen command prompts you for a location and filename to store the key pair and for a password. When prompted for the location and filename you can press enter to use the default. It is a best practice to use a password for an SSH key but it is not required and you can skip creating a password by pressing enter. Note that the password you choose here can"t be altered or retrieved.
ssh-keygen -t rsa -C "$your_email"
Use the code below to show your public key.
cat ~/.ssh/id_rsa.pub
Copy-paste the key to the "My SSH Keys" section under the "SSH" tab in your user profile. Please copy the complete key starting withssh-
and ending with your username and host.-------------------------------------------------------------------
<3>after adding the ssh key in here, we could use smartGit on Ubuntu to pull the project.
Remote -> add URL/Path -> git@XXXX.git (ssh url)
- 上一篇: Git使用:在Git pull时遇到的Error及解决方法
- 下一篇: GIT处理超大大文件时拉取报错