Re: Using socks proxy with git for http(s) transport

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Try:
>
>   git config --global http.proxy 'socks://yourhost:port'
>
> That will enable it for all git repositories on your machine. Git should
> also respect any environment variables that curl handles (because we use
> libcurl under the hood), if you prefer to set it up that way. See "man
> curl" for details.

Thanks Jeff but it's not working.
I use git 1.8.15
My socks proxy listen on my localhost at port 1080 so I do:
git config --global http.proxy  'socks://127.0.0.1:1080'

But when i try to talk with a git server with http protocol i have:

GIT_TRACE=1 GIT_CURL_VERBOSE=1 git ls-remote
http://git.kernel.org/pub/scm/git/git.git

trace: built-in: git 'ls-remote' 'http://git.kernel.org/pub/scm/git/git.git'
trace: run_command: 'git-remote-http'
'http://git.kernel.org/pub/scm/git/git.git'
'http://git.kernel.org/pub/scm/git/git.git'
* Couldn't find host git.kernel.org in the .netrc file, using defaults
* About to connect() to proxy 127.0.0.1 port 1080
*   Trying 127.0.0.1... * connected
* Connected to 127.0.0.1 (127.0.0.1) port 1080
> GET http://git.kernel.org/pub/scm/git/git.git/info/refs?service=git-upload-pack HTTP/1.1
User-Agent: git/1.8.1.5
Host: git.kernel.org
Accept: */*
Accept-Encoding: gzip
Proxy-Connection: Keep-Alive
Pragma: no-cache

* Empty reply from server
* Connection #0 to host 127.0.0.1 left intact
error: Empty reply from server while accessing
http://git.kernel.org/pub/scm/git/git.git/info/refs?service=git-upload-pack
fatal: HTTP request failed

As you can see git connect to my socks proxy (Connected to 127.0.0.1
(127.0.0.1) port 1080) but seems to send the http request directly
instead of a socks command. So it does'nt work :(

Regards,
Yves
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]