You might need to modify
git commands that access (to update and read from) remote repositories if your internet access is through a proxy server.
Proxy servers are common in college and business type environments.
You can locate your proxy settings from your browser’s settings panel.
Once you have obtained the proxy settings (server URL, port, username and password); you need to configure your git as follows:
$ git config --global http.proxy http://<username>:<password>@<proxy-server-url>:<port>
You would need to replace
<port> with the values specific to your proxy server credentials. These fields are optional. For instance, your proxy server might not even require
<password>, or that it might be running on port 80 (in which case
<port> is not required).
Once you have set these, your
git push or even
git fetch would work properly.
You should not have to use
git commands with proxy settings, if either of the following happens
gitrepositories from GitHub, BitBucket etc.
Use this Stack Overflow discussion to unset your proxy settings.
You may use the following for further reading on this: