Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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/

I have also tried an install/uninstall of bower and a bower clean cache.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
426 views
Welcome To Ask or Share your Answers For Others

1 Answer

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>"
}

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...