
Usually downloading packages has been pain over corporate networks. One way is to switch to personal network now and then to download packages.
Here is a work around for this, use any proxy server providing your credentials. But thing is everytime I change my password I break my head to finally realize the packages are not downloading because of the old credentials in the proxy settings. This is how I get around this, usingFiddler.
Once you have downloaded fiddler, open fiddler and then under rules menu checkAutomatically Authenticate
For NPM
Set using following commands
npm configsetproxy http://localhost:8888/npm configsethttps-proxy http://localhost:8888/
OR
do this manually, openC:\Users\<user name>\.npmrc
and set proxy to the port fiddler is running on like below
proxy=http://localhost:8888/https-proxy=http://localhost:8888/strict-ssl=false
strict-ssl
is set to false to ignore certificate validation, Use this with caution there are a lot packages that are malicious.
now trynpm -i <packagename>
For MAVEN
OpenC:\Users\<user name>\.m2\settings.xml
and add this follwing section insettings
node
<proxies><proxy><id>optional</id><active>true</active><protocol>http</protocol><host>localhost</host><port>8888</port><nonProxyHosts></nonProxyHosts></proxy><proxy><id>optional</id><active>true</active><protocol>https</protocol><host>localhost</host><port>8888</port><nonProxyHosts></nonProxyHosts></proxy></proxies>
For GRADLE
Add this below properties in root folder ofgradle.properties
systemProp.http.proxyHost=127.0.0.1systemProp.http.proxyPort=8888systemProp.https.proxyHost=127.0.0.1systemProp.https.proxyPort=8888
Hope this Helps!
Originally Posted onBitsmonkey
Photo by Jonathan on Unsplash
Top comments(0)
For further actions, you may consider blocking this person and/orreporting abuse