Reputation: 4467
I can't get bower or npm to work though a client's network and I'm not sure if I'm setting up the proxy settings correctly.
I've tried the various suggestions on answers to similar questions and simply nothing works for me. I get the following error:
C:\myproj>bower search react
bower retry Request to http://bower.herokuapp.com/packages/search/react
failed with ETIMEDOUT, retrying in 1.7s
bower retry Request to http://bower.herokuapp.com/packages/search/react
failed with ETIMEDOUT, retrying in 3.6s
bower retry Request to http://bower.herokuapp.com/packages/search/react
failed with ETIMEDOUT, retrying in 7.0s
bower retry Request to http://bower.herokuapp.com/packages/search/react
failed with ETIMEDOUT, retrying in 14.6s
I can access http://bower.herokuapp.com
fine though the browser and it serves me the json reply.
my .bowerrc file (used '\\'
on the domain\user name as it failed to parse it otherwise):
{
"directory": "Content/bower_components",
"proxy": "http://mydomain\\myuser:[email protected]:8080",
"https-proxy": "http://mydomain\\myuser:[email protected]:8080",
"strict-ssl": false,
"registry": "http://bower.herokuapp.com"
}
for NPM it just hangs:
C:\myproj>npm install grunt-cli
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
|
my .gitconfig file:
[url "http://"]
insteadOf = git://
[http]
proxy = http://mydomain\\myuser:[email protected]:8080
[https]
proxy = http://mydomain\\myuser:[email protected]:8080
my .npmrc file:
proxy=http://mydomain\\myuser:[email protected]:8080/
https-proxy=http://mydomain\\myuser:[email protected]:8080/
strict-ssl=false
All works fine if I connect to a different network without firewall. I'm not sure if I've entered my user name/ password correctly on the proxy string supplied, or if I'm just missing a setting somewhere else.
Upvotes: 0
Views: 595
Reputation: 4467
So the problem was that I didn't escape special characters in my proxy url used by NPM (.npmrc) and Bower (.bowerrc).
i.e.
proxy=http://domain\user:password@proxy:8080"
needed to be
proxy=http://domain%5Cuser:password@proxy:8080"
Upvotes: 1