How do I get git to use a proxy server?
I need to check out code from a git server, it shows "Request timed out" every time. How do I get around this?
Alternatively, how can I set a proxy server?
How do I get git to use a proxy server?
I need to check out code from a git server, it shows "Request timed out" every time. How do I get around this?
Alternatively, how can I set a proxy server?
If you are using ubuntu, then do the following ...
Step 1 : Install corkscrew
Step 2 : Write a script named git-proxy.sh and add the following
Step 3 : Make the script executable
Step 4 : Set up the proxy command for GIT by setting the environment variable
Now use the git commands,such as
In addition of thse answers, I found helpful to consider these 2 points:
One may need to enforce an authentication scheme:
Also, typically with NTLM authentication schema, one may need to provide explicitely the AD domain.
In git bash:
And update the http.proxy accordingly:
Anyway, investigation may be helped by adding CURL logs:
Faced same issue because of multiple
.gitconfig
files in windows, followed below steps to fix the same:Step 1: Open Git BASH
Step 2: Look for
.gitconfig
, executing following command:Step 3: Copy the below content in
.gitconfig
:This worked for me, in windows XP behind a corporate firewall.
I didnt have to install any local proxy or any other software besides git v1.771 from http://code.google.com/p/msysgit/downloads/list?can=3
proxyuser= the proxy user I was assigned by our IT dept, in my case it is the same windows user I use to log in to my PC, the Active Directory user
proxypwd= the password of my proxy user
proxy.server.com:8080 = the proxy name and port, I got it from Control Panel, Internet Options, Connections, Lan Settings button, Advanced button inside the Proxy Server section, use the servername and port on the first (http) row.
mygithubuser = the user I use to log in to github.com
mygithubpwd = the password for my github.com user
repoUser = the user owner of the repo
repoName = the name of the repo
For the git protocol (git://...), install socat and write a script such as:
make it executable, put it in your path, and in your
~/.gitconfig
setcore.gitproxy
to the name of that script.I followed the most of the answers which was recommended here. First I got the following error:
Then I have tried the following command by @Salim Hamidi
But I got the following error:
This could happen if the proxy server can't verify the SSL certificate. So we want to make sure that the ssl verification is off (not recommended for non trusted sites), so I have done the following steps which was recommended by @Arpit but with slight changes:
1.First make sure to remove any previous proxy settings:
2.Then list and get the gitconfig content
3.Last update the content of the gitconfig file as below: