Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git:// through proxy

I'm behind a firewall that is blocking port 9418 (git) and am trying to install some tools that are explicitly doing a checkout of git://github.com/..., so I can't switch to https for the checkout.

So I'm wondering if it's possible to redirect all traffic to port 9418 through a proxy and if so how :)

like image 274
Nobody Avatar asked May 02 '11 18:05

Nobody


People also ask

How do I use Git behind proxy?

Setting the proxy for Git Run the following commands replacing USERNAME , PASSWORD , PROXY_ADDRESS , and PROXY_PORT with your network's information: git config --global --add http. proxy http://USERNAME:PASSWORD@PROXY_ADDRESS:PROXY_PORT.

Does GIT use Http_proxy?

Now whenever you do anything with [email protected] , it will use the proxy automatically.


2 Answers

If you are talking about git submodules, try this:

git config --global url.https://github.com/.insteadOf git://github.com/ 

...taken from here.

This way, you don't need to set any proxy, nor run any script.

like image 65
mppfiles Avatar answered Sep 16 '22 14:09

mppfiles


Have a look at core.gitproxy setting in Git config.

Quick googling revealed this script that may be useful (or may not — I did not try it): https://gist.github.com/49288

like image 25
Alexander Gladysh Avatar answered Sep 20 '22 14:09

Alexander Gladysh