繁体   English   中英

代理后面的 Windows 7 上的 Git Bash 不再工作

[英]Git Bash on windows 7 behind proxy no longer working

我在 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 的错误。版本切换似乎解决了这个问题。

我有同样的问题通过使用两个代理过滤器来解决它:

“--proxy或-x”和“--proxy-user”。

curl -x http://proxyserverurl:port --proxy-user username:password -L http://url

虽然您尝试过的也没有错,但可能与您的卷曲版本不兼容。

希望这可以帮助!

我遇到过同样的问题。 导出环境变量https_proxyhttp_proxy解决了这个问题。 所以我最终将以.bashrc添加到主目录中的.bashrc文件中:

# Configure proxy settings
export https_proxy='http://myproxy.example.com:8086/' 
export http_proxy='http://myproxy.example.com:8086/' 

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM