Setting Node JS / NPM Proxy

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

To make node js or npm work behind a firewall

Get node compiled for Solaris from

http://www.petertribble.co.uk/Solaris/node.html

Note: after pkgadd, move Node to node. also modify this file /opt/node/lib/node_modules/npm/bin/npm-cli.js

Disable strict ssl use

Set the regstry to non https

Verfy with npm config list

Then to install

Or by setting the proxy and then install

npm install expres

npm and bower

cat /root/.bowerrc

{
    "registry": "http://bower.herokuapp.com",
    "strict-ssl": false,
    "proxy":"http://user:password@your-domain.com:8080/",
    "https-proxy":""
}

git proxy and certficate or self sign issues

  • change proxyuser to your proxy user
  • change proxypwd to your proxy password
  • change proxy.server.com to the URL of your proxy server
  • change 8080 to the proxy port configured on your proxy server

If you have issues with self sign, try one of the below

git config --global http.sslverify "false"

or if you like to add a ca

git config –global http.sslcainfo /bin/certificate.crt

 

Leave a Reply

avatar
  Subscribe  
Notify of