Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git connection time out trying to clone via proxy

Tags:

git

proxy

I am getting a connection timeout error when I try to clone a Git repo via a proxy server.

git clone http://opensource.freescale.com/pub/scm/imx/linux-2.6-imx.git
Cloning into linux-2.6-imx...
error: Failed connect to opensource.freescale.com:8080; Connection timed out while accessing http://opensource.freescale.com/pub/scm/imx/linux-2.6-imx.git/info/refs

fatal: HTTP request failed

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

like image 233
user900785 Avatar asked Mar 16 '12 11:03

user900785


1 Answers

you do not need corkscrew for accessing a http repo behind a proxy server.

set the environment variable http_proxy

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

and then git will use the http proxy

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

like image 95
Peter Tillemans Avatar answered Nov 03 '22 02:11

Peter Tillemans