In work I have a proxy, at home I don't have a proxy
In work I set the proxy like:
git config - -global http.proxy http://proxy.theaddress.co.uk:8080 git config - -global https.proxy https://proxy.theaddress.co.uk:8080
At home I remove the proxy like
git config --global --unset http.proxy git config --global --unset https.proxy
I'm trying to push something to my git repo with
git push -u origin master
And I get
Could not resolve proxy: proxy.theaddress.co.uk
The .gitconfig file looks like this.
[user] name = first last email = [email protected] [http] [https] [push] default = current [http] [core] excludesfile = /Users/first.last/.gitignore_global [difftool "sourcetree"] cmd = opendiff \"$LOCAL\" \"$REMOTE\" path = [mergetool "sourcetree"] cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\" trustExitCode = true [http] [https] [http] [https] [http] [https] [http] [https] [http] [https] [filter "media"] clean = git media clean %f smudge = git media smudge %f required = true [http] [https] [https] [http] [http] [https] [http]
How do I remove the proxy ?
Setting the proxy for Gitgit config --global --add http. proxy http://USERNAME:PASSWORD@PROXY_ADDRESS:PROXY_PORT. git config --global --add https. proxy http://USERNAME:PASSWORD@PROXY_ADDRESS:PROXY_PORT.
The Solution Error: “Could not resolve proxy: https; Unknown error” explains that there is a syntax issue in /etc/sysconfig/rhn/up2date config file for proxy server. Change https to http and then retry the yum update.
Check the environment variables with :
$echo $http_proxy $echo $https_proxy $echo $HTTPS_PROXY $echo $HTTP_PROXY
if any of these environment variables are set then unset them by just using http_proxy=
then enter
will unset those
$export http_proxy=
Delete all of the following variables if they are set while working on the network having no proxy (Example at the home)
//Computer=>System properties=>Advanced=>Environment Variables http_proxy,https_proxy,HTTPS_PROXY,HTTP_PROXY
Unset git proxy
git config --global --unset http.proxy git config --global --unset https.proxy
Both steps together worked for me in Windows.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With