Can't clone a repository through socks5 proxy. Error: "Proxy CONNECT aborted"

2,399 views
Skip to first unread message

Denis Bakharev

unread,
Aug 8, 2018, 6:35:02 AM8/8/18
to git-for-windows
Hello! I can't clone a repository through socks5 proxy

J:\Work>git --version
git version
2.18.0.windows.1

J
:\Work>git config --get http.proxy
'socks5://my_proxy_hostname.ru:1080'

J
:\Work>git clone https://github.com/denbkh/denbkh.github.io.git example-repo
Cloning into 'example-repo'...
fatal
: unable to access 'https://github.com/denbkh/denbkh.github.io.git/': Proxy CONNECT aborted

But, with cygwin's version of git and the same proxy I can clone this repository without any problems. Suggestions?

Johannes Schindelin

unread,
Aug 8, 2018, 3:17:15 PM8/8/18
to Denis Bakharev, git-for-windows
Hi Denis,
I think http.proxy is handled by cURL, and since Cygwin builds cURL with
totally different options than we do, it is quite possible that we simply
don't support SOCKS5 proxies in that manner.

You could try to run this with `GIT_TRACE_CURL=1` to find out more.

Ciao,
Johannes

Denis Bakharev

unread,
Aug 8, 2018, 3:42:16 PM8/8/18
to git-for-windows
With GIT_TRACE_CURL=1:
> git clone https://github.com/denbkh/denbkh.github.io.git example-repo
Cloning into 'example-repo'...
22:34:53.975887 http.c:724              == Info: No valid port number in proxy string (1080')
22:34:53.975887 http.c:724              == Info: Couldn'
t find host github.com in the _netrc file; using defaults
22:34:53.975887 http.c:724              == Info:   Trying 192.168.100.1...
22:34:53.975887 http.c:724              == Info: TCP_NODELAY set
22:34:54.035888 http.c:724              == Info: Connected to socks5.denbkh.ru (192.168.100.1) port 1080 (#0)
22:34:54.035888 http.c:724              == Info: allocate connect buffer!
22:34:54.035888 http.c:724              == Info: Establish HTTP proxy tunnel to github.com:443
22:34:54.035888 http.c:671              => Send header, 0000000121 bytes (0x00000079)
22:34:54.035888 http.c:683              => Send header: CONNECT github.com:443 HTTP/1.1
22:34:54.035888 http.c:683              => Send header: Host: github.com:443
22:34:54.035888 http.c:683              => Send header: User-Agent: git/2.18.0.windows.1
22:34:54.035888 http.c:683              => Send header: Proxy-Connection: Keep-Alive
22:34:54.035888 http.c:683              => Send header:
22:34:54.095888 http.c:724              == Info: Proxy CONNECT aborted
22:34:54.095888 http.c:724              == Info: CONNECT phase completed!
22:34:54.095888 http.c:724              == Info: Connection #0 to host socks5.denbkh.ru left intact

fatal
: unable to access 'https://github.com/denbkh/denbkh.github.io.git/': Proxy CONNECT aborted

Johannes Schindelin

unread,
Aug 9, 2018, 9:16:16 AM8/9/18
to Denis Bakharev, git-for-windows
Hi Denis,

On Wed, 8 Aug 2018, Denis Bakharev wrote:

> With GIT_TRACE_CURL=1:
> > git clone https://github.com/denbkh/denbkh.github.io.git example-repo
> Cloning into 'example-repo'...
> 22:34:53.975887 http.c:724 == Info: No valid port number in
> proxy string (1080')

You did notice this, didn't you?

Ciao,
Johannes
> --
> You received this message because you are subscribed to the Google Groups "git-for-windows" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to git-for-windo...@googlegroups.com.
> To post to this group, send email to git-for...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/git-for-windows/aa73fc7b-6b37-48de-bdae-7b71ef334ffd%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

Denis Bakharev

unread,
Aug 9, 2018, 12:44:47 PM8/9/18
to git-for-windows
Aha, thank you! I noticed the first line, but then I have in log:
Connected to socks5.denbkh.ru (192.168.100.1) port 1080 (#0)
It looks like that it was able to parse the port correctly...
Well, removing the single quotes from the proxy string fixes the problem.

Reply all
Reply to author
Forward
0 new messages