linux - 如何在 Git 上配置 socks5 代理

标签 linux git proxy

我在 Linux 操作系统上通过代理下载 git 启动链接 (git://anongit.freedesktop.org/wayland/wayland) 时遇到问题。

我是用Git客户端(http://git-scm.com/download/linux)下载的,在.gitconfig文件中配置http.proxy后,http链接下载成功。

但是我已经尝试了很多方法来为git link配置socks5代理,但是都没有用。有人知道吗?

更多信息:

  1. 我需要使用 1080 端口的 socks5 代理。

  2. 这个socks5代理有用户名和密码

最佳答案

patthoyts提到的补丁在“Using a socks proxy with git for the http transport”中最终将在 Git 2.7 中成为上游(2015 年 12 月)

参见 commit 6d7afe0 (2015 年 10 月 26 日)Pat Thoyts (patthoyts) .
(由 Jeff King -- peff --commit 92b9bf4 中 merge ,2015 年 12 月 1 日)

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.

关于linux - 如何在 Git 上配置 socks5 代理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28690996/

相关文章:

git - 不知何故,我的 git develop 分支被 merge 到了我的 master 分支中

android - 你如何更新到最新的分支而不必再次下载所有内容?

wcf - 自定义工具警告: An item with the same key has already been added

ios - 如何在 Objective-C 中为 http 代理服务器使用 MKNetwork 框架

c -/lib/libmatrix.a : file not recognized: File format not recognized collect2: ld returned 1 exit status

linux - Nanomsg 组播带宽问题

git - 为什么 ^M 会附加到 git diff 中的所有更新行

nginx - 带有 Nginx 反向代理和解析器的 Jenkins

linux - 来自 Xlib : "Killed" 的消息来源

linux - 在 Redhat 中如何从文件中提取文本并将其作为正文通过电子邮件发送?