KatsuYuzuのブログ

.NET の開発をメインとした日記です。

Visual Studio 2015 の bower で GitHub から clone できないのを解決する #aspnetjp

先日の記事で Visual Studio 2015 の bower で GitHub からファイル取れなかったって書いた件。
katsuyuzu.hatenablog.jp
結論的には、後日調べるって参考 URL 貼っておいたもので解決した。

エラー内容

ECMDERR Failed to execute "git clone https://github.com/borisyankov/DefinitelyTyped.git -b master --progress . --depth 1", exit code of #-532462766

解決方法

stackoverflow から引用。

Same problem using VS 2015, my workaround :
1.Install Git
http://git-scm.com/
2.Configure Git to use http instead of git:// with Git Bash
git config --global url."http://".insteadOf git://
3.Configure VS to use the new installed Git over VS Git
Right click on Bower folder (under Dependencies), then select "Configure external tools"
Uncheck "$(DevEnvDir)\Extensions\Microsoft\Web Tools\External\git"
Add a new node with "C:\Program Files (x86)\Git\bin"

git - VS 2015 + Bower: Does not work behind firewall - Stack Overflow

手順 3 については [ツール] > [オプション] > [プロジェクトおよびソリューション] > [外部 Web ツール] から設定できるので、ASP.NET 5 のプロジェクトを作らなくても設定可能。
f:id:KatsuYuzu:20160121004006p:plain