Proxy config in Bash, NPM, Bower, Atom, Git & Ionic
Posted in Web-Dev, Proxy
Sometimes when you are building stuff behind huge networks like universities and
corporates, you often face proxy configuration issues with many applications
like NPM, Bower, Ionic, Git, Atom and Linux Bash itself. This article focuses on
resolving these issues.
unset http_proxy
unset https_proxy
unset ftp_proxy
//these commands disable the proxy, temporarily for that particular bash session.
NPM
With Authentication
1
2
npm config set proxy "http://username:password@[Your Proxy]:[Proxy Port]/"
npm config set https-proxy "http://username:password@[Your Proxy]:[Proxy Port]/"
Without Authentication
1
2
npm config set https-proxy http://[Your Proxy]:[Proxy Port]
npm config set proxy http://[Your Proxy]:[Proxy Port]
View Proxy
1
2
npm config get https-proxy
npm config get proxy
Remove proxy
1
2
3
4
5
6
7
npm config delete https-proxy
npm config delete proxy
//or
npm config set https-proxy null
npm config set proxy null
Bower
With Authentication
1
2
3
//add the lines to `.bowerrc`"proxy":"http://username:password@[Your Proxy]:[Proxy Port]/""https-proxy":"http://username:password@[Your Proxy]:[Proxy Port]/"
Without Authentication
1
2
3
// add the lines to `.bowerrc`"proxy":"http://[Your Proxy]:[Proxy Port]""https-proxy":"http://[Your Proxy]:[Proxy Port]"
View Proxy
1
cat .bowerrc
Remove proxy
1
// edit and remove the lines from `.bowerrc` added earlier
Atom
With Authentication
1
2
apm config set proxy "http://username:password@[Your Proxy]:[Proxy Port]/"
apm config set https-proxy "http://username:password@[Your Proxy]:[Proxy Port]/"
Without Authentication
1
2
apm config set https-proxy http://[Your Proxy]:[Proxy Port]
apm config set proxy http://[Your Proxy]:[Proxy Port]
View Proxy
1
2
apm config get https-proxy
apm config get proxy
Remove proxy
1
2
3
4
5
6
7
apm config delete https-proxy
apm config delete proxy
//or
apm config set https-proxy null
apm config set proxy null
Hi, I am Diwakar, magician03 on Github and other networks. Information Technology Undergrad at Indian Institute of Information Technology Allahabad, class of 2019. Algorithms fanatic. Love to build products. Open Source Enthusiast. Ambivert. Programmer.