git 无法通过我的工作代理进行连接



我希望 git 使用 127.0.0.1:8080 代理进行连接

这是http.proxyhttps.proxy的输出

$ git config --get http.proxy
http://127.0.0.1:8080
$ git config --get https.proxy
http://127.0.0.1:8080

我已经为我的系统设置了这个代理,它正在与chrome,Firefox,Gradle,Android Studio一起使用。所以我相信这是正确的。但是 git 无法从远程存储库获取我的代码。

这是消息(来自源代码树):

ssh: connect to host bitbucket.org port 22: Operation timed out
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

我确定拥有正确的访问权限。

为什么 git 不使用该代理?

我也必须为 ssh 设置代理信息吗?如何?

为什么 git 不使用该代理?
我也必须为 ssh 设置代理信息吗?如何?

因为 ssh 不使用 http 代理。完全。

您可以:

  • 切换到 BitBucket 存储库的 https URL,

    git remote set-url origin https://<username>@bitbucket.org/<username>/myrepo.git
    
  • 或者确保端口 22 已打开(未被防火墙阻止)

最新更新