Bower ECMDERR: 执行命令 "git ls-remote --tags --heads > git@github.om:mobify/bellows.git" 失败,错误码为 #128。

13
我正在尝试使用bower安装pinny1.0插件,命令如下:
``` bower install https://github.com/mobify/pinny.git#pinny-1.0 ```
但在安装插件时,我遇到了以下问题:
``` bower ECMDERR Failed to execute "git ls-remote --tags --heads git@github.com:mobify/bellows.git", exit code of #128 Additional error details: Host key verification failed. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. ```
我不确定为什么会从pinny1.0重定向到bellows.git。
我尝试在Github bug跟踪中查找此问题,并在#1426中找到了一些讨论,但由于我没有使用代理服务器,所以并没有得到太多想法。
2个回答

14

我曾经在使用 Bower 安装 packages 时遇到过相同的问题。

这个问题是由于 bower代理配置 引起的,当安装 packages 时,你需要让 bower 使用 http:// 而不是 git:// 。你可以通过创建一个 .bowerrc 文件解决这个问题。

只需 创建一个 .bowerrc 文件并设置 proxyhttps-proxy 配置:

{
  "proxy" : "http://<host>:<port>",
  "https-proxy" : "http://<host>:<port>"
}

关于 Bower 文档.bowerrc 文件的更多内容。

在 StackOverflow 上有两个关于 bower proxy 配置 的问题: 第一个问题第二个问题

更新:

如果第一个解决方案无法解决问题,你可以尝试在 GitHub 上向 @thebignet 提交同样的问题。

proxyhttps-proxystrict-ssl 配置写入 .bowerrc 文件:

{
  "proxy"       : "http://<host>:<port>",
  "https-proxy" : "http://<host>:<port>",
  "strict-ssl"  : false
} 

但是你必须从终端运行命令:

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

对我有用!谢谢 - Andy Poquette
这可能是一个基本问题,但我应该把.bowerrc文件放在哪里? - Samuel Segal
@VincentGauthier 将 .bowerrc 文件放入您应用程序文件夹的根路径中,就像 bower.json 文件和 package.json 文件一样。 - ahmed hamdy

0

这确实是一个奇怪的错误。有趣的是,git URL 看起来格式不正确。

git@github.om:mobify/bellows.git

.com 中没有 'c'。而且奇怪的是,Pinny 正试图拉进风箱;它们完全不相关。

你能告诉我你正在使用哪个操作系统和 bower 版本吗?

我会尝试重现这个问题,并让你知道是否发现了什么。


抱歉Steve,那是个打字错误,URL应该是github.com:mobify。另外,操作系统是Windows 7 Pro x64。我是使用Git Bash而不是任何浏览器来进行操作的。我也在想为什么安装Pinny与Bellows有关?可能是由于一些内部依赖关系吧?另外,我已经在我的应用程序的bower_plugins中安装了更新的Bellows。 - Rupendra
这与此完全无关。事实上,我似乎无法在OSX或Windows上重现此问题,所以我有点困惑。你能发布你的bower.json吗? - steve_c

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接