Git connection timeout trying to clone through a proxy

I get a connection timeout error when I try to clone a Git repo through a proxy server.

git clone http://opensource.freescale.com/pub/scm/imx/linux-2.6-imx.git
Cloning in linux-2.6-imx ...
Error: Failed to connect to opensource.freescale.com:8080; Connection timeout while accessing http://opensource.freescale.com/pub/scm/imx/linux-2.6-imx.git/info/refs

fatal: HTTP request failed

I used a corkscrew and set my Git proxy to the server address and port. How else can I download or clone Git repo over proxy?

+6
source share
1 answer

you don’t need a corkscrew to access the http repo behind the proxy server.

set http_proxy environment variable

 export http_proxy=http://<proxy>:<port>/ 

and then git will use http proxy

see also http://roshansingh.wordpress.com/2008/08/29/using-git-behind-proxy/

+10
source

Source: https://habr.com/ru/post/910899/


All Articles