我被困在公司防火墙/代理地狱里。我试图从我的bower.json文件安装我的依赖项,但遇到以下错误:
bower jquery#~2.1.1 ECMDERR Failed to execute "git ls-remote --tags --heads https://github.com/jquery/jquery.git", exit code of #128
Additional error details:
fatal: unable to access 'https://github.com/jquery/jquery.git/': Failed connect to github.com:443; No error我已经在谷歌上找到了很多答案,并尝试了以下方法,但似乎没有一个能解决我的问题。
我已经为我的git配置设置了以下内容:
url.http://.insteadof=git://
url.https://.insteadof=git://我使用CNTLM管理我的代理凭据,因此我的代理设置如下所示:
http.proxy=http://127.0.0.1:53128/
https.proxy=http://127.0.0.1:53128/以下是我的NPM配置中的内容:
http_proxy = "http://127.0.0.1:53128/"
https-proxy = "http://127.0.0.1:53128/"
https_proxy = "http://127.0.0.1:53128"
proxy = "http://127.0.0.1:53128/"
registry = "http://registry.npmjs.org/"
strict-ssl = false并且我在我的.bowerrc文件中设置了以下内容:
"proxy":"http://127.0.0.1:53128",
"https-proxy":"http://127.0.0.1:53128",
"strict-ssl":false我想这就是全部,当我尝试bower list时,我得到了类似的错误信息。
我的所有git命令(比如克隆)都能很好地通过代理。这就是为什么我认为这是一个bower配置问题,但我找不到太多的帮助。
提前谢谢。
发布于 2014-10-31 20:09:38
在Windows cmd行中,我这样设置了我的代理环境变量
> set https_proxy=http://10.1.56.10:80/
> set http_proxy=http://10.1.56.10:80/然后我就可以获得我的依赖项了
发布于 2016-05-17 14:29:43
我发现了一个类似的问题,发现是.bowerrc文件造成的。
我把我的代码改成了这样,它运行得很好:
{
"proxy":"http://127.0.0.1:53128",
"https-proxy":"http://127.0.0.1:53128",
"registry": "http://bower.herokuapp.com",
"strict-ssl":false
}https://stackoverflow.com/questions/26489781
复制相似问题