【问题标题】:error: Failed connect to github.com:8080; Connection refused错误:无法连接到 github.com:8080;拒绝连接
【发布时间】:2013-04-16 14:05:01
【问题描述】:

我知道这个问题并不新鲜,我一直在寻找答案,但直到现在对我没有任何帮助。

问题是每次我尝试git clonegit pull 命令时,都会收到以下错误:

error: Failed connect to github.com:8080; Connection refused while accessing https://github.com/mxcl/homebrew.git/info/refs?service=git-upload-pack
fatal: HTTP request failed

(这里是https://github.com/mxcl/homebrew.git/info/refs?service=git-upload-pack,但这只是一个例子,我对所有网址都有这个问题)

【问题讨论】:

  • 端口 8080 通常不与 https:// url 关联。 8443 是我希望在这里看到的,如果它必须不是 443 的话。
  • 试试git://github.com/mxcl/homebrew.git?
  • 实际上我尝试了“git clone git://github.com/mxcl/homebrew.git”并且它有效,而“git clone https://github.com/mxcl/homebrew.git/info /refs?service=git-upload-pack" 不断返回相同的错误...知道问题出在哪里吗?
  • 嗯,git clone https://github.com/mxcl/homebrew.git 是正确的命令。 git clone https://github.com/mxcl/homebrew.git/info/refs?service=git-upload-pack 根本不是正确的语法。我原以为会有更好的错误消息,但我没想到它会克隆存储库。

标签: git git-clone


【解决方案1】:

检查您是否设置了 git http.proxyhttps.proxy 配置,并取消设置两者。见pull command error : Failed connect to github.com:8080

【讨论】:

  • 我已经试过了。这很奇怪,因为即使我遵循这个过程(取消设置 http 和 https),它也会不断返回一个 http.proxy 设置(kuzh.polytechnique.fr:8080)并且没有 https.proxy(这应该是正确的,不?)
  • 谢谢!我忘记了我最近将 git 配置为通过代理工作。 :P
【解决方案2】:

在推送或拉取之前尝试设置公钥/私钥对。

ssh-keygen -t rsa -C "youremailid@xxxx.com"

【讨论】:

    猜你喜欢
    • 2013-10-21
    • 2011-07-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-03-25
    • 2020-01-29
    • 2019-07-04
    • 1970-01-01
    相关资源
    最近更新 更多