如何让 Bower 为 ASP.NET 5 应用程序安装 typeahead.js?

How to get bower to install typeahead.js for ASP.NET 5 Application?

问题

根据 git 存储库中 typeahad.js 的说明。您应该在 windows 命令行中执行以下操作(也在我的 asp.net 5 应用程序的根目录中):

bower install typeahead.js

当我这样做时,我最终看到了以下错误。

bower typeahead#~0.11.1 not-cached git://github.com/twitter/typeahead.git#~0.11.1 bower typeahead#~0.11.1 resolve git://github.com/twitter/typeahead.git#~0.11.1 bower typeahead.js#* cached git://github.com/twitter/typeahead.js.git#0.11.1 bower typeahead.js#* validate 0.11.1 against git://github.com/twitter/typeahead.js.git#* bower typeahead#~0.11.1 ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/twitter/typeahead.git", exit code of #-532462766

尝试次数

好吧,也许这是因为 git 而不是 https。所以我尝试了

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

它给了我以下错误:

Unsupported command arguments: config --global url.https://.insteadOf git://

备注

我目前打算安装整个 zip 并将其放在一个我可以访问的文件中,但是有人以前或现在可以找出可能导致此失败的原因吗?我把头发扯了一个小时左右,但想不通。我不知道有任何防火墙或防病毒问题会导致这些问题。我也在 Hyper-V 上使用 Window 10。

我想看看是否有其他人找到了一种不像我将要做的那样棘手的解决方法?如果我能让它与 Bower 一起工作,我会很好。

谢谢,

hlyates

答案很简单。线索是 unsupported 命令。看来VS15自带的git包还不完整。于是我就去获取了githere。然后我再次 运行 上面的命令,问题就解决了。