
- #Npm config set proxy in bashrc how to
- #Npm config set proxy in bashrc install
- #Npm config set proxy in bashrc code
- #Npm config set proxy in bashrc password
I just have have my share of fight with npm and proxy settings and since I do not like other answers I like to share how I think this should be resolved (compromising security is not an option). Bonus is that you can tell curl to use the same cabundle.pem and it will also understand HTTPs.
#Npm config set proxy in bashrc how to
Phew! We made it! Now npm can understand how to connect.


Where rootcert is the filename of the certificate you saved in step 5. Openssl x509 -inform DES -in **rootcert**.cer -out outcert.pem -text Convert the file you saved in step 5 by using this command:.We will use openssl to convert the file to the PEM format we need for NPM to understand it. Most likely the openssl executable will be at C:\Program Files\git\usr\bin\openssl.exe.
#Npm config set proxy in bashrc install
Otherwise, install git for windows at this stage.

The top certificate, or the root certificate is the one we want to extract.

I base most of my answer on the information there. There is good information on curl's page on SSL and certificate issues.
#Npm config set proxy in bashrc code
Then edit the "username", "password", and "proxy" fields in the code you pasted.Ĭheck your settings by running npm config list and cat ~/.npmrc # (Bonus Settings! Not required for npm to work, but needed for lots of other programs) Simply paste the following code at the bottom of your ~/.bashrc file: # So I added the following into my ~/.bashrc or ~/.bash_profile so that whenever I open a terminal, I know my npm is up to date!
#Npm config set proxy in bashrc password
If your company is like mine, I have to change my password pretty often. Put your settings into ~/.bashrc or ~/.bash_profile so you don't have to worry about your settings everytime you open a new terminal window! Npm config set proxy config set https-proxy config set strict-ssl false When in doubt, try all these commands, as I do: npm config set registry
