tags:

views:

41

answers:

2

our company provide internet access for us using proxy, but after configured http.proxy, i am keeping get HTTP code 417 After a little google, i guess it's because the libcurl that git use sent the "Expect: 100-continue" header, which the proxy(i guess a Squid) does not understand and reply with 417: Expection failed. I can not change the proxy setting, so below are my questions: 1) can i disable the Expect header of libcurl? i know i can use -H option of curl(the binary), but seems git/ libcurl does not support this option. 2) or how can i get around this problem without do anything with the proxy ? Thanks in advance,

A: 

I do not know about proxying with Squid, but if you only need to pull, could you mirror the git repository with curl or wget to a local folder, and then tell git to use that instead?

Thorbjørn Ravn Andersen
i was pull from github, could you tell me how can i mirror some project from github? For example http://github.com/mongodb/mongo-python-driver.git
You might find http://help.github.com/firewalls-and-proxies/ useful.
Thorbjørn Ravn Andersen
A: 

It sounds like you're trying to use Git through the proxy? You could try this:

git config --global http.proxy="http://&lt;user&gt;:&lt;password&gt;@&lt;proxy address>:<proxy port>"

For example,

git config --global http.proxy="http://jonathan:Password1@webproxy:8090"

Then, when performing a git clone or setting up a git remote, use http:// instead of git:// as the protocol.

Jonathan
yes, i was using proxy, but my proxy does not support 100-continue header that Git's libcurl send to it. Sorry, it's my first question on StackOverflow, i do not know how to format the text.