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

来源:互联网 发布:js 实现bind 编辑:程序博客网 时间:2024/06/03 07:20

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)







0 0
原创粉丝点击