Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.5k views
in Technique[技术] by (71.8m points)

amazon web services - Git Clone Fails - fatal: The remote end hung up unexpectedly. fatal: early EOF fatal: index-pack failed

My computer has proper configuration SSH, I got this error when trying to clone the repository:

I run this command to clone the repository

git clone ssh://git-codecommit.us-west-2.amazonaws.com/v1/repos/NewsFeed-library library1

It's giving me an error:

Cloning into 'library1'...

remote: Counting objects: 510, done.

Connection to git-codecommit.us-west-2.amazonaws.com closed by remote

host. fatal: The remote end hung up unexpectedly fatal: early EOF

fatal: index-pack failed

How to resolve this error and why I got this error?


Edit: I have already tried it but did not succeed:

#Windows
set GIT_TRACE_PACKET=1
set GIT_TRACE=1
set GIT_CURL_VERBOSE=1

and

git config --global ssh.postBuffer 524288000 
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

If you have an alternative option to clone on http, run any of the below commands in gitbash and try to clone the repository, it should work.

  1. git config --global http.postBuffer 524288000
  2. git config --global http.postBuffer 1048576000

And, if you don't have the option of http and want to proceed with ssh. You can configure SSH keepAlive either on the client or server.

Configure on server
Edit

~/.ssh/config  
ServerAliveInterval 60
ServerAliveCountMax 5

Configure on client Edit on /etc/ssh/sshd_config

ClientAliveInterval 60
ClientAliveCountMax 5

e.g.

echo 'ClientAliveInterval 60' | sudo tee --append /etc/ssh/sshd_config

EDIT: git config --global ssh.postBuffer 1048576000

Try increasing the buffer, i face the same probelm in my repository.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...