bower-致命:无法连接到github.com

bower-致命:无法连接到github.com,github,bower,Github,Bower,在我的mac(Yosemite 10.10.2)上升级ember cli后 或者在约塞米蒂升级到10.10.2之后, 或者在将我的Java升级到v8-32之后。。。 我的凉亭不工作了 如果我尝试: bower list 我得到一个错误: bower check-new Checking for new versions of the project dependencies.. bower ECMDERR Failed to execute "git ls-remote --tags --he

在我的mac(Yosemite 10.10.2)上升级ember cli后

或者在约塞米蒂升级到10.10.2之后, 或者在将我的Java升级到v8-32之后。。。 我的凉亭不工作了

如果我尝试:

bower list
我得到一个错误:

bower check-new Checking for new versions of the project dependencies..
bower ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/rwjblue/ember-cli-test-loader.git", exit code of #128

Additional error details:
fatal: unable to connect to github.com:
github.com[0: 192.30.252.128]: errno=Operation timed out
但如果我执行:

git ls-remote --tags --heads git://github.com/rwjblue/ember-cli-test-loader.git
它的工作原理是:

git ls-remote --tags --heads git://github.com/rwjblue/ember-cli-test-loader.git
c6006a11515c756d115bb5209103a22c2e9554a0 refs/heads/master
929777f8b5c60db3120712c7328f5debdf74a0cd refs/tags/0.0.1
055d50f770ad333e7ead10ecb04605f951e2435b refs/tags/0.0.2
9defa2c59df38dcc334d6c1cc266075c04c2a4f6 refs/tags/0.0.3
a925b8fc428829ea3599e66eb0e6353726426356 refs/tags/0.0.4
c6006a11515c756d115bb5209103a22c2e9554a0 refs/tags/v0.1.0
此外,每个git克隆git://或http://都可以工作,我可以通过http访问192.30.252.128

只有在与鲍尔的组合中,它才不起作用。 与npm我也没有问题

我尝试的是卸载并重新安装bower。但这并不能解决问题

下一次尝试:

.bowerrc
.gitconfig

[url "https://"]
    insteadOf = git://
与:

下一次尝试:

.bowerrc
.gitconfig

[url "https://"]
    insteadOf = git://
结果是:

Additional error details:
fatal: unable to access 'https://github.com/furf/jquery-ui-touch-punch.git/': Failed to connect to github.com port 443: Operation timed out
我还尝试:

ssh -T git@github.com
在已知主机下添加github.com

奇怪的是:

ssh -T git@github.com
ssh: connect to host github.com port 22: Operation timed out
请再试一次:

ssh -T git@github.com
Hi xxxx! You've successfully authenticated, but GitHub does not provide shell access.
因此,有时有效,有时无效。看 表明github的一切都很好

但为什么我有时会超时? 可能是DNS服务器延迟?每一个其他连接都很好

另外,阿平看起来不错: 最糟糕的时候是

time=100.173 ms
几分钟后,我开始并行执行bower安装命令,超时时间与之前相同。。。。但ping仍在继续,只有100毫秒

我也退出我的防火墙没有结果

我没有配置代理

有什么想法吗

更新日期2014年2月9日

我目前在汉堡和这里,鲍尔安装工程良好。所以这不是我的系统安装的问题

更新日期2014年2月12日

回到家后,它也能正常工作,没有任何变化。 奇怪

一种需要模块的解决方案 此解决方案尚未针对
bower list
进行测试,但是(就像我的情况一样),由于当地的环境政策,您可能无法安装
bower。以下是让我能够利用鲍尔的优势——让我从众多头痛中解脱出来:

...
"dependencies": {
    "angular": "https://code.angularjs.org/1.3.15/angular.js",
    "jquery": "https://github.com/jquery/jquery.git#~2.1.4",
    "moment": "https://github.com/moment/moment.git",
    "underscore": "https://github.com/jashkenas/underscore.git#~1.8.3"
}
...
或者

bower安装https://domain.ext/path/to/asset.ext -S

您可能在尝试安装时遇到错误,
fatal:无法连接到github.com:
——这是因为在某些环境中,bower无法解析
git://
协议。但是,它将解析
http:

我的建议是:

  • 在Bower搜索包裹
  • 导航到git存储库
  • 复制httpsgit克隆URI
  • bower安装https://.../author/module.git --保存
这将(
--save
/
-S
)使用包版本的
#~n.n.n
符号将包保存到
bower.json
文件中

希望这能像我一样帮助你们。

来自这个npm线程:

尝试将以下内容转储到.gitconfig中

[url "https://"]
    insteadOf = git://
[url "https://github.com"]
    insteadOf = git@github.com
由于我在Windows计算机上,我还必须确保
c:\users\me\.gitconfig
和我修改后的主驱动器
h:\.gitconfig
上的配置相同。

运行

git config --global url."https://".insteadOf git://

省去了很多痛苦,特别是在防火墙后面的时候

OSX——代理背后也有同样的问题(我猜)。在谷歌搜索这个错误,你会发现很多关于BowerGit的问题。这解决了我的问题。谢谢我正在使用Mac OS X,并将此代码段添加到文件~/.gitconfig的末尾。非常感谢此代码段解决了我的问题,尝试了许多解决方案,但都无济于事。