I was stuck in this problem until I noticed that I was not logged into my VPN.
-
If you have configured your proxy for a VPN, you need to login to your VPN to use the proxy.
-
to use it outside the VPN use the unset command:
git config --global --unset http.proxy
And remember to set the proxy when within the VPN.