Carlos Granados
Carlos Granados

Reputation: 407

Git couldn't resolve proxy

I'm trying to push my changes but keep getting the following error:

error: Couldn't resolve proxy ''xx.xxx.xxx.xxx' while accessing http://name:[email protected]:7678/scm/xx/xxx.git/info/refs?service=git-receive-pack
fatal: HTTP request failed

Previously I had set up a proxy for an unrelated project on Windows 8 through 'LAN Settings' in 'Internet Options', I removed the proxy but it seems that Git is trying to connect to it for some reason. I never set any proxy options on Git.

I've tried the following:

git config --global --unset http.proxy
git config --global --unset core.gitproxy
git config --local --unset http.proxy

Upvotes: 2

Views: 2980

Answers (1)

VonC
VonC

Reputation: 1323553

Try a git config -l | grep proxy to see if there is any http.proxy setting defined anywhere.

And check your HTTP_PROXY/HTTPS_PROXY environment variables: even without git setting in place, those variables could be picked up by git for a git push.

set HTTP_PROXY=
set HTTPS_PROXY=

The idea is to set those settings or environment variable with the right url, without double single quotes.

The OP Carlos Granados confirms in the comments:

I removed the environment variable 'HTTP_PROXY'.
The Git file did not have those variables set.

Upvotes: 1

Related Questions