【发布时间】:2013-08-19 18:36:58
【问题描述】:
我使用的是 Windows 7 32 位机器,并且在代理后面工作。我刚刚将我的 git 客户端 (Git Bash) 升级到 Git-1.8.3-preview20130601,突然间,每当我尝试推/拉时,我都会收到以下错误:
fatal: unable to access 'https://github.com/User/simple_timesheets.git/:
Received HTTP code 407 from proxy after Connect
在升级之前我能够做到这一点,即使我尝试恢复到我认为我拥有的上一个版本,我仍然会收到错误消息。当我运行git config -l 时,它会列出以下变量(以及其他变量):
user.name=MyName
user.email=My@email.com
http.proxy=http://user:password@server:port
core.autocrlf=true
https.proxy=http://user:password@server:port
http.sslcainfo=/bin/curl-ca-bundle.crt
奇怪的是我似乎可以使用Git Bash 客户端卷曲就好了
curl finance.yahoo.com --proxy http://user:password@server:port
甚至可以卷曲到我在计算机上设置的虚拟 https 站点:
curl https://localhost:3000 --insecure
任何想法我错过了什么?谢谢
编辑:
我可能是错的,但我认为版本 1.8.3 中的 curl 可能存在问题。我在我的电脑上卸载了所有我能想到的与 git 相关的应用程序,并安装了Git-1.8.0-preview20121022,运行了一个 repo 并成功了。
为了傻笑,我卸载了工作版本,并保留了证书文件;然后重新安装了 1.8.3 版本,看看这是否与它没有任何关系,但我遇到了与我最初试图解决的相同的错误。
另外,在重新安装 1.8.0 版本后,我尝试使用以下命令 curl 一个 https 网站(gmail):curl https://www.gmail.com --proxy http://user:pass@server:port,成功。当我在 1.8.3 下执行此操作时,我收到有关代码 407 的错误。版本切换似乎解决了这个问题。
【问题讨论】:
-
我刚刚尝试运行以下命令:
curl https://www.gmail.com --proxy http://user:password@server:port > gmail.html,它给出了以下命令:curl: (56) Received HTTP code 407 from proxy after CONNECT -
stackoverflow.com/questions/8561671 的重复项?有关 https 代理,请参阅我的 answer there。