Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git through digest proxy authentication

Tags:

git

proxy

I want to do "git clone" through a proxy server. The issue is my proxy server uses digest authentication. So i can't find neither in git documentation, nor help that someone that already made.

I dig through google search and i can't find any helpful results.

Thxs.

like image 980
erick2red Avatar asked Jan 18 '10 18:01

erick2red


People also ask

How do I change my proxy settings in Git?

Setting the proxy for Gitgit config --global --add http. proxy http://USERNAME:PASSWORD@PROXY_ADDRESS:PROXY_PORT. git config --global --add https. proxy http://USERNAME:PASSWORD@PROXY_ADDRESS:PROXY_PORT.


2 Answers

Just to save a few moments of googling on Bennet's Answer:

  1. Clear old settings:
    >git config --global --unset https.proxy
    >git config --global --unset http.proxy
  2. Set new settings:
    >git config --global https.proxy https://USER:[email protected]:80
    >git config --global http.proxy http://USER:[email protected]:80

  3. Verify new settings:
    >git config --get https.proxy
    >git config --get http.proxy

NOTE: When you verify, you should see the same values that you put in.

like image 134
Delicia Brummitt Avatar answered Sep 18 '22 14:09

Delicia Brummitt


I was able to do a git clone through an authenticated proxy by setting the environment variable http_proxy to http://username:password@proxyhost:80

Then a plain ole git clone worked.

(The proxy is some corporate Windows thing, so my username actually looked like domain\username. Took a while to realise that I needed the domain.)

like image 36
Bennett McElwee Avatar answered Sep 20 '22 14:09

Bennett McElwee