Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git - Could not resolve proxy:

Tags:

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 ?

like image 350
ttmt Avatar asked Dec 11 '14 18:12

ttmt


People also ask

How do I change my proxy settings in Git?

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.

Can't resolve proxy Kali Linux?

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.


2 Answers

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= 
like image 116
harip Avatar answered Sep 28 '22 05:09

harip


  • 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.

like image 24
Satishakumar Awati Avatar answered Sep 28 '22 05:09

Satishakumar Awati