在我的mac上升级ember-cli后(Yosemite 10.10.2)
npm uninstall -g ember-cli
npm cache clean
bower cache clean
npm install -g ember-cli@0.1.12
....
Run Code Online (Sandbox Code Playgroud)
或者也许在Yosemite升级到10.10.2之后,或者在将我的Java升级到v8-32之后...我的凉亭不再工作了.
如果我尝试:
bower list
Run Code Online (Sandbox Code Playgroud)
我收到一个错误:
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
Run Code Online (Sandbox Code Playgroud)
但是如果我执行:
git ls-remote --tags --heads git://github.com/rwjblue/ember-cli-test-loader.git
Run Code Online (Sandbox Code Playgroud)
有用:
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
Run Code Online (Sandbox Code Playgroud)
此外,每个git clone git://或http://都有效,我可以通过http访问192.30.252.128.
只有与凉亭结合才行不通.有了npm,我也没有问题.
我尝试的是卸载并重新安装凉亭.但这并没有解决问题.
接下来尝试:
.bowerrc
Run Code Online (Sandbox Code Playgroud)
有:
{
"directory": "bower_components",
"analytics": false,
"proxy": "",
"https-proxy": ""
}
Run Code Online (Sandbox Code Playgroud)
接下来尝试:
.gitconfig
[url "https://"]
insteadOf = git://
Run Code Online (Sandbox Code Playgroud)
结果如下:
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
Run Code Online (Sandbox Code Playgroud)
我也尝试:
ssh -T git@github.com
Run Code Online (Sandbox Code Playgroud)
在known_hosts下添加github.com.
奇怪的是:
ssh -T git@github.com
ssh: connect to host github.com port 22: Operation timed out
Run Code Online (Sandbox Code Playgroud)
再试一遍:
ssh -T git@github.com
Hi xxxx! You've successfully authenticated, but GitHub does not provide shell access.
Run Code Online (Sandbox Code Playgroud)
所以有时候它有效,有时却不行.看看https://status.github.com/,可以 看出github的一切都很好.
但为什么我有时会超时?也许DNS服务器滞后?其他所有连接都很好.
ping也很好看:最时髦的是
time=100.173 ms
Run Code Online (Sandbox Code Playgroud)
超过几分钟,我开始并行bower安装命令与以前相同的超时....但ping正在进行,只有100毫秒.
我也没有结果退出我的防火墙.
我没有代理配置.
任何的想法?
更新09/02/2014
我目前在汉堡和这里,凉亭安装工作正常.所以这不是我的系统安装问题.
更新12/02/2014
回到家后,它也没有任何变化.奇怪!
从这个npm线程:https://github.com/npm/npm/issues/5257#issuecomment-60441477
尝试将以下内容转储到.gitconfig中
[url "https://"]
insteadOf = git://
[url "https://github.com"]
insteadOf = git@github.com
Run Code Online (Sandbox Code Playgroud)
由于我在Windows机器上,我还必须确保c:\users\me\.gitconfig和我修改的家用驱动器h:\.gitconfig上的那台机器相同.
跑步
git config --global url."https://".insteadOf git://
Run Code Online (Sandbox Code Playgroud)
可以节省很多痛苦,特别是如果位于防火墙后面的话。
该解决方案尚未经过测试bower list,但是(就像我的情况一样)bower install由于当地的环境政策,您可能会受到阻碍。以下是我能够利用 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"
}
...
Run Code Online (Sandbox Code Playgroud)
或者,
bower install https://domain.ext/path/to/asset.ext -S
fatal: unable to connect to github.com:您在尝试安装时可能会收到错误消息- 这是因为在某些环境下 Bower 无法解析git://协议。不过,它会解决的http(s):。
我的建议:
bower install https://.../author/module.git --save这会将包保存( --save/ ) 到您的文件中,并带有包版本的符号。-Sbower.json#~n.n.n
希望这对你们有帮助,就像我一样。
| 归档时间: |
|
| 查看次数: |
8770 次 |
| 最近记录: |