牛骨文教育服务平台(让学习变的简单)
博文笔记

SolveProblem:Git 遇到了early EOF index-pack failed问题

创建时间:2016-09-20 投稿人: 浏览次数:1265

Problem:

  • git clone fails with "index-pack" failed?
  • Git checking out problem
  • [fatal: early EOFs]


Method:
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)







声明:该文观点仅代表作者本人,牛骨文系教育信息发布平台,牛骨文仅提供信息存储空间服务。