代理后面的凉亭 [英] bower behind a proxy
本文介绍了代理后面的凉亭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
bower install
具有以下设置的超时失败(某些设置没有用...):
bower install
behind a proxy fails in timeout with the following settings (some set are useless...) :
git config --global http.proxy fr-proxy.example.com:3128
git config --global https.proxy fr-proxy.example.com:3128
export http_proxy=http://fr-proxy.example.com:3128
export https_proxy=http://fr-proxy.example.com:3128
npm config set proxy http://fr-proxy.example.com:3128
npm config set https-proxy http://fr-proxy.example.com:3128
npm config set registry http://registry.npmjs.org/
我还尝试了Bower和bower clean cache
的安装/卸载.
I have also tried an install/uninstall of bower and a bower clean cache
.
推荐答案
编辑.bowerrc文件并添加所需的代理配置:
Edit your .bowerrc file and add the wanted proxy configuration:
{
"proxy":"http://<host>:<port>",
"https-proxy":"http://<host>:<port>"
}
如果在经过身份验证的代理后面工作,则应包括用户名和密码,如下所示:
If working behind an authenticated proxy, user and password should be included like this:
{
"proxy":"http://<user>:<password>@<host>:<port>",
"https-proxy":"http://<user>:<password>@<host>:<port>"
}
通常,.bowerrc在bower.json旁边.而且,如果bower.json文件附近没有.bowerrc文件,则可以自己创建一个.
Usually, the .bowerrc is next to the bower.json. And if there is no .bowerrc file near the bower.json file, you can create one by yourself.
这篇关于代理后面的凉亭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文