Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

fatal: read error: Connection reset by peer

Tags:

git

git-clone

Can some one help me to get rid of following:

vijay13@ubuntu:~$ git clone git://anongit.kde.org/plasma-mediacenter

Cloning into 'plasma-mediacenter'...

fatal: read error: Connection reset by peer

And

vijay13@ubuntu:~$ git clone [email protected]:plasma-mediacenter

Cloning into 'plasma-mediacenter'...

Read from socket failed: Connection reset by peer

fatal: The remote end hung up unexpectedly

How to get rid of both above issues?

like image 500
Vijay13 Avatar asked Jul 31 '13 17:07

Vijay13


2 Answers

If internet connection is also fine, just run

git gc 

and try again. It cleans up unnecessary files and optimize the local repository. For more details: git documentation

like image 88
user846316 Avatar answered Sep 21 '22 08:09

user846316


I also have faced with this problem.

The problem is solved when i replace "git://" with "https://"

root@ubuntu:~# git clone git://github.com/osrg/ryu.git
Cloning into 'ryu'...
fatal: read error: Connection reset by peer

root@ubuntu:~# git clone https://github.com/osrg/ryu.git
Cloning into 'ryu'...
remote: Counting objects: 25613, done.
remote: Compressing objects: 100% (5/5), done.
Receiving objects:  37% (9609/25613), 18.68 MiB | 60.00 KiB/s
like image 43
Yavuz Sert Avatar answered Sep 22 '22 08:09

Yavuz Sert