Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

407 Authentication required npm

Hello everyone I´ve been trying to configure and use npm on my enterprise PC without success.

I´ve set proxy, https-proxy, strict-ssl false, registry http://registry.npmjs.org proxy has been set like this "http://user:password@proxy_ip:proxy:port" Where the password has a special character written in urlencode.

npm config get proxy 

returns proxy with credentials as they should be.

I have cleared my npm cache and tried again.

No success.

Any ideas what can be the problem?

like image 287
AndiFB Avatar asked Apr 18 '18 14:04

AndiFB


2 Answers

I recommend reading through this article to configure the proxy for npm. http://wil.boayue.com/blog/2013/06/14/using-npm-behind-a-proxy/

  • npm config set proxy http://proxy.company.com:proxyport

  • npm config set http-proxy http://proxy.company.com:proxyport

  • npm config set https-proxy http://proxy.company.com:proxyport

Hope this is useful for you!

like image 193
Suhas Gavad Avatar answered Sep 20 '22 12:09

Suhas Gavad


Usually, when you are behind a corporate proxy, it is needed to add the domain where you are at. Given that also the characters should be URL encoded, it would look like:

https://domain%5Cusername:password@proxy:port

like image 31
lautit Avatar answered Sep 19 '22 12:09

lautit