I am trying to push to my repo but receiving an error:
fatal: unable to access 'https://github.com/myrepo.git/': Could not resolve proxy: --list
I already changed the proxy settings :
git config --global --unset http.proxy
my global config settings are:
push.default=simple
http.sslverify=false
url.https://.insteadof=git://
credential.helper=cache --timeout=3600
But still getting this error? How can I solve this?
git config --global --unset http.proxy
git config --unset http.proxy
http_proxy=""
You can list all the global settings using
git config --global --list
My proxy settings were set as
...
remote.origin.proxy=
remote.origin.proxy=address:port
...
The command git config --global --unset remote.origin.proxy
did not work.
So I found the global .gitconfig
file it was in, using this
git config --list --show-origin
And manually removed the proxy fields.
Check if you have environment variable that could still define a proxy (picked up by curl
, even if the git config does not include any proxy setting anymore):
HTTP_PROXY
HTTPS_PROXY
If you already unset the proxy from global and local level and still see the proxy details while you do
git config -l
then unset the variable from system level, generally the configuration stored at below location
C:\Program Files\Git\mingw64/etc/gitconfig
Did you already check your proxys here?
git config --global --list
or
git config --local --list
You config proxy settings for some network and now you connect another network. Now have to remove the proxy settings. For that use these commands:
git config --global --unset https.proxy
git config --global --unset http.proxy
Now you can push too. (If did not remove proxy configuration still you can use git commands like add , commit and etc)
Some times, local config command won't show the proxy but it wont allow git push due to proxy. Run the following commands within the directory and see.
#git config --local --list
But the following commands displays the proxy set to local repository:
#git config http.proxy
#git config https.proxy
If the above command displays any proxy then clear it by running the following commands:
#git config https.proxy ""
#git config https.proxy ""
This is in the case if first answer does not work The latest version of git does not require to set proxy it directly uses system proxy settings .so just do these
unset HTTP_PROXY
unset HTTPS_PROXY
in some systems you may also have to do
unset http_proxy
unset https_proxy
if you want to permanantly remove proxy then
sudo gsettings set org.gnome.system.proxy mode 'none'
Source: Stackoverflow.com