Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.7k 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 Reply

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...