如何解决“Recv failure: Connection reset by peer”错误

问题描述 投票:0回答:6

我在

$ git pull
上尝试
$ git fetch
myRepo
命令给我错误但
myTestRepo
工作正常。

命令给我那个错误。

Fetching origin
fatal: unable to access 'http://mysite/myPath/myRepo.git/': Recv failure: Connection reset by peer
error: Could not fetch origin

我尝试了 git

$ git fetch -p
$ git fetch -p --all -f
命令,他们在命令给出相同的错误之后工作了一两次。

git fatal-error git-pull git-fetch
6个回答
2
投票

我正在使用

http
连接,我将连接更改为
ssh
而不是 http,问题就解决了


2
投票

我遇到了类似的问题,但想通了。实际上,github 没有

http
,只有
https
。尝试将
http
替换为
https
.


0
投票

当你使用http url时,如果80被阻止,可能会发生这种情况。


0
投票

我有这个问题

git clone xyz.git

我解决了它添加 sudo 突击队

sudo git clone xyz.git

0
投票

如果您的公司通过 proxy 使用 github 那么:

在你的用户 .gitconfig 文件中,包含对应于 HTTPS 的代理 URL。

像下面的例子:

[https]
    proxy = https://YOUR_HTTPS_PROXY:PORT_NUMBER

或者只是运行

git config --global https.https://domain.com.proxy https://proxyUsername:[email protected]:port

你可以在这里看到更多:

https://gist.github.com/evantoli/f8c23a37eb3558ab8765


0
投票

对于同步问题GitHub

  1. 在 IntelliJ 中按
    Ctrl+Alt+S
    并转到
    GitHub
    部分(不是
    Git
    )。
  2. 选中
    Clone git repositories using ssh
    复选框。
  3. 更新项目。
© www.soinside.com 2019 - 2024. All rights reserved.