我如何通过HTTP代理从Git存储库中获取? [英] How do I pull from a Git repository through an HTTP proxy?
问题描述
git clone
。 我有一个Git控件下的项目。我想添加一个子模块:
git submodule add http://github.com/jscruggs/metric_fu.git vendor / plugins / metric_fu
但是我得到
...
获得1b0313f016d98e556396c91d08127c59722762d0
获得4c42d44a9221209293e5f3eb7e662a1571b09421
获得b0d6414e3ca5c2fb4b95b7712c7edbf7d2becac7
错误:无法下http://github.com/找到abc07fcf79aebed56497e3894c6c3c06046f913a jscruggs / metri ...
无法获取所需的提交abc07fcf79aebed56497e3894c6c3c06046f913a
,同时处理提交ee576543b3a0820cc966cc10cc41e6ffb3415658。
致命:抓取失败。
将'http://github.com/jscruggs/metric_fu.git'克隆到子模块路径'vendor / plugins / metric_fu'中
我有我的HTTP_PROXY设置:
c:\ project> echo%HTTP_PROXY%
http://proxy.mycompany:80
我甚至有一个http代理的全局Git设置:
c:\ project> git config --get http.proxy
http://proxy.mycompany:80
有没有人获得HTTP提取一贯通过代理工作?真奇怪的是,GitHub上的一些项目工作正常( awesome_nested_set
),但其他人则始终失败(例如, rails )。
最后的工作是设置 http_proxy
环境变量。我已经正确设置了 HTTP_PROXY
,但git显然更喜欢小写版本。
Note: while the use-case described is about using submodules within a project, the same applies to a normal git clone
of a repository over HTTP.
I have a project under Git control. I'd like to add a submodule:
git submodule add http://github.com/jscruggs/metric_fu.git vendor/plugins/metric_fu
But I get
...
got 1b0313f016d98e556396c91d08127c59722762d0
got 4c42d44a9221209293e5f3eb7e662a1571b09421
got b0d6414e3ca5c2fb4b95b7712c7edbf7d2becac7
error: Unable to find abc07fcf79aebed56497e3894c6c3c06046f913a under http://github.com/jscruggs/metri...
Cannot obtain needed commit abc07fcf79aebed56497e3894c6c3c06046f913a
while processing commit ee576543b3a0820cc966cc10cc41e6ffb3415658.
fatal: Fetch failed.
Clone of 'http://github.com/jscruggs/metric_fu.git' into submodule path 'vendor/plugins/metric_fu'
I have my HTTP_PROXY set up:
c:\project> echo %HTTP_PROXY%
http://proxy.mycompany:80
I even have a global Git setting for the http proxy:
c:\project> git config --get http.proxy
http://proxy.mycompany:80
Has anybody gotten HTTP fetches to consistently work through a proxy? What's really strange is that a few project on GitHub work fine (awesome_nested_set
for example), but others consistently fail (rails for example).
What finally worked was setting the http_proxy
environment variable. I had set HTTP_PROXY
correctly, but git apparently likes the lower-case version better.
这篇关于我如何通过HTTP代理从Git存储库中获取?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!