2013-07-31 58 views
8

有人可以帮我摆脱以下内容:致命:读取错误:连接重置由对等

[email protected]:~$ git clone git://anongit.kde.org/plasma-mediacenter 

Cloning into 'plasma-mediacenter'... 

fatal: read error: Connection reset by peer 

而且

[email protected]:~$ 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 

如何摆脱这两个上面的问题?

+0

修复您的网络? –

+0

你是通过IPV4还是IPv6连接? (目前我没有问题连接到anongit) – Doon

+0

伙计们感谢coz“git​​ clone anongit.kde.org/plasma-mediacenter”工作过:-) – Vijay13

回答

0

对于第一个问题

[email protected]:~$ git clone git://anongit.kde.org/plasma-mediacenter 

Cloning into 'plasma-mediacenter'... 

fatal: read error: Connection reset by peer 

在这里,您正在尝试使用上面的命令来检查代码。 我甚至遇到这个错误:尝试检出代码时由对等方重置连接。

这是一个问题与您的互联网连接

检查您的互联网连接,然后重试。

它帮助了我。

6

如果互联网连接也很好,只是运行

git gc 

,然后再试一次。

+1

你能解释一下它在做什么,它为什么起作用? –

+0

“[gc]在当前版本库中运行许多内务处理任务,例如压缩文件修订版(以减少磁盘空间并提高性能)并删除可能由之前的git add调用创建的不可达对象。 -https://git-scm.com/docs/git-gc –

3

我也遇到过这个问题。

当我更换问题是解决了 “混帐://”“https://开头”

[email protected]:~# git clone git://github.com/osrg/ryu.git 
Cloning into 'ryu'... 
fatal: read error: Connection reset by peer 

[email protected]:~# 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 
0

这也可以删除回购时(但不是永久)是一个问题。确保在克隆前删除垃圾箱/回收站中的回购站。

或者按SHIFT + DEL永久删除文件夹/文件。

相关问题