How to config socks5 proxy on Git

前端 未结 1 1015
悲&欢浪女
悲&欢浪女 2020-12-18 10:23

I have problem with downloading the git start link (git://anongit.freedesktop.org/wayland/wayland) through a proxy on Linux OS.

I am using Git client (http://git-sc

相关标签:
1条回答
  • 2020-12-18 10:29

    The patch mentioned by patthoyts in "Using a socks proxy with git for the http transport" will finally make it upstream in Git 2.7 (Dec. 2015)

    See commit 6d7afe0 (26 Oct 2015) by Pat Thoyts (patthoyts).
    (Merged by Jeff King -- peff -- in commit 92b9bf4, 01 Dec 2015).

    remote-http(s): support SOCKS proxies

    With this patch we properly support SOCKS proxies, configured e.g. like this:

    git config http.proxy socks5://192.168.67.1:32767
    

    Without this patch, Git mistakenly tries to use SOCKS proxies as if they were HTTP proxies, resulting in a error message like:

    fatal: unable to access 'http://.../': Proxy CONNECT aborted
    

    This patch was required to work behind a faulty AP and scraped from Using a socks proxy with git for the http transport and guarded with an appropriate cURL version check by Johannes Schindelin.

    0 讨论(0)
提交回复
热议问题