Skip to content

Instantly share code, notes, and snippets.

@EudesSilva
Last active March 10, 2024 10:55
Show Gist options
  • Save EudesSilva/0329645b9c258e0495544b8a5ccd1454 to your computer and use it in GitHub Desktop.
Save EudesSilva/0329645b9c258e0495544b8a5ccd1454 to your computer and use it in GitHub Desktop.
Config proxy in Git, Yarn, Bower, NPM, Maven, Docker, Gradle, General
#Configuration Proxy
#Git
git config --global http.proxy http://<username>:<password>@<proxy-port>
git config --global https.proxy http://<username>:<password>@<proxy-port>
#NPM
npm get proxy // show config proxy
npm config set strict-ssl false
npm config set registry "http://registry.npmjs.org/"
npm config set proxy http://<username>:<password>@proxy.company.com:3128
npm config set https-proxy http://<username>:<password>@proxy.company.com:3128
#YARN
yarn config set proxy http://<username>:<password>@proxy.company.com:3128
yarn config set https-proxy http://<username>:<password>@proxy.company.com:3128
#Bower
{
"proxy":"http://<username>:<password>@proxy.company.com:3128",
"https-proxy":"http://<username>:<password>@proxy.company.com:3128"
}
#Maven
<proxies>
<proxy>
<id>id</id>
<active>true</active>
<protocol>http</protocol>
<username>username</username>
<password>password</password>
<host>host</host>
<port>port</port>
<nonProxyHosts>127.0.0.1|localhost</nonProxyHosts>
</proxy>
</proxies>
#Gradle
systemProp.proxySet="true"
systemProp.http.keepAlive="true"
systemProp.http.proxyHost=host
systemProp.http.proxyPort=port
systemProp.http.proxyUser=username
systemProp.http.proxyPassword=password
systemProp.http.nonProxyHosts=localhost
systemProp.https.keepAlive="true"
systemProp.https.proxyHost=host
systemProp.https.proxyPort=port
systemProp.https.proxyUser=username
systemProp.https.proxyPassword=password
systemProp.https.nonProxyHosts=localhost
#Docker
docker-machine create -d virtualbox \
--engine-env HTTP_PROXY=http://<username>:<password>@proxy.company.com:3128 \
--engine-env HTTPS_PROXY=http://<username>:<password>@proxy.company.com:3128 \
default
#General
set HTTPS_PROXY=http://<username>:<password>@proxy.company:3128
set HTTP_PROXY=http://<username>:<password>@proxy.company:3128
export HTTPS_PROXY=http://<username>:<password>@proxy.company:3128
export HTTP_PROXY=http://<username>:<password>@proxy.company:3128
export http_proxy=http://<username>:<password>@proxy.company:3128
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment