VS 2015 + Bower: Does not work behind firewall

前端 未结 12 2203
一向
一向 2020-11-29 01:40

Problem

In Visual Studio 2015, using bower, my package restores fail when behind a firewall with an error similar to:

ECMDERR Failed to exec

12条回答
  •  自闭症患者
    2020-11-29 02:44

    Microsoft's version of git that is installed (at least with VS2015 Update 1) does honor the .gitconfig file, but the tooling that is installed by default does not give you a way to manipulate it (like all the other answers show using git config to fix the problem).

    To fix the problem without any extra installations and whatnot, simply create a .gitconfig file in C:\Users\YourUserName and put this content in there (which is the content that git config --global would do but since you dont have a git.exe that can change config, you cannot use that without installing something else you do not really need)

    
        [url "https://github.com/"]
            insteadOf = git@github.com:
        [url "https://"]
            insteadOf = git://
    
    

提交回复
热议问题