Configure proxy settings for Git

If you are using git from behind a proxy then you will need to tell it what your proxy settings are.

The following commands configure the proxy settings for http and https, if you don’t need to specify a username and password then you can leave them (and the @ sign) out, and just substitute the correct URL for your proxy server.

$ git config --global http.proxy http://username:password@proxy.server:port
$ git config --global https.proxy https://username:password@proxy.server:port

If you need to undo you changes then you can unset the proxy settings using the following commands.

$ git config --global --unset http.proxy
$ git config --global --unset https.proxy

This entry was posted in Linux. Bookmark the permalink.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.