Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not resolve proxy - git clone

Tags:

git

github

I am working on a TensorFlow tutorial at the moment and need to download the source code. When I run git clone ..., however, I get the following error:

C:\Git\cmd>git clone https://github.com/tensorflow/nmt/
Cloning into 'nmt'...
fatal: unable to access 'https://github.com/tensorflow/nmt/': Could not resolve proxy: aproxy

I am working from my home network and have the latest version of Git.
I tried the following command, without success:

git config --global --unset https.proxy

Any ideas?

like image 986
Payal Ahuja Avatar asked Sep 02 '25 06:09

Payal Ahuja


2 Answers

Git has its own proxy.

To reset git proxy:

git config --global https.proxy ""
git config --global http.proxy ""

To reset system proxy:

On Ubuntu, you can set proxy by using

export http_proxy=""
export https_proxy=""

export all_proxy=""

Then run

git clone
like image 183
Gary Mendonca Avatar answered Sep 04 '25 21:09

Gary Mendonca


Go to your cloned repository, and type:

git config -l --show-origin

Check if you see any http(s).proxy setting anywhere (since git config --global --unset only takes care of one of the config files)

Check also your environment variable in the CMD session/bash you are in (set or env) and make sure no HTTP(S)_PROXY variable was defined.

like image 21
VonC Avatar answered Sep 04 '25 22:09

VonC