简体   繁体   中英

fatal: read error: Connection reset by peer

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?

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

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

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.

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

For me, this issue happened when changed my PHP version to 7.0.10 from 5.6 version in WAMP. for quick solution, reverting the change, fixed my issue back.

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.

I tried using git config --global http.postBuffer 157286400 but did not work. Then tried one more time and it work so looks like intermittent network issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM