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.
(注意:虽然描述的用例是关于在项目中使用子模块的,但是这同样适用于通过HTTP进行存储库的普通git clone
。)
I have a project under Git control.
(我有一个在Git控制下的项目。)
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:
(我设置了HTTP_PROXY:)
c:project> echo %HTTP_PROXY%
http://proxy.mycompany:80
I even have a global Git setting for the http proxy:
(我什至为http代理设置了全局Git设置:)
c:project> git config --get http.proxy
http://proxy.mycompany:80
Has anybody gotten HTTP fetches to consistently work through a proxy?
(有没有人获取过HTTP抓取以通过代理一致地工作?)
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). (真正奇怪的是,GitHub上的一些项目运行良好(例如awesome_nested_set
),但是其他项目却始终失败(例如rails )。)
ask by James A. Rosen translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…