24

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 git@git.kde.org: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?

Machavity
  • 30,841
  • 27
  • 92
  • 100
Vijay13
  • 525
  • 2
  • 8
  • 18

5 Answers5

28

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

user846316
  • 6,037
  • 6
  • 31
  • 40
21

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
Yavuz Sert
  • 2,387
  • 2
  • 13
  • 26
0

For the first issue

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

Cloning into 'plasma-mediacenter'...

fatal: read error: Connection reset by peer

Here you are trying to check out a code by using the above command. I even encounter this error : Connection reset by peer when try to check out a code.

It is a problem with your internet connection.

Check your internet connection and try again.

It helped me.

Skitty
  • 1,709
  • 18
  • 21
0

This may be due to outdated git dependency library. Try updating curl for your operating system.

Rajan Twanabashu
  • 4,586
  • 5
  • 43
  • 55
-1

This can also be an issue when deleting repos (but not permanently). Make sure the repo is deleted in the trash/ recycling bin before cloning.

Alternatively press SHIFT + DEL to delete a folder/ file permanently.

Aaron Thompson
  • 1,849
  • 1
  • 23
  • 31