如何让git使用代理服务器?
我需要从git服务器检出代码,每次都显示"Request timed out".我该如何解决这个问题?
或者,如何设置代理服务器?
如何让git使用socks代理进行http传输?
我成功地使用GIT_PROXY_COMMAND配置git以使用socks代理进行GIT传输.
此外,我已经配置我的.curlrc文件来定义socks代理,我可以直接用curl命令获取信息,如:
curl http://git.kernel.org/pub/scm/git/git.git/info/refs?service=git-upload-pack
Run Code Online (Sandbox Code Playgroud)
但是如何使用带git的socks代理来使用http传输协议检索数据,如:
git clone http://git.kernel.org/pub/scm/git
Run Code Online (Sandbox Code Playgroud) 因此,GitHub现在被俄罗斯政府和Rospotrebnadzor正式禁止.我使用GitHub创建自由软件并分享它,这是我生活中重要的一部分.
今天我在Arch Linux上安装了Tor,现在我可以浏览GitHub和其他被禁网站了.我试图git通过Tor做作,但没有成功.
这是我做的:
git config --global http.proxy localhost:9050
git config --global https.proxy localhost:9050
Run Code Online (Sandbox Code Playgroud)
但是当我试图推动时,我得到错误501:
致命:无法访问' https://X@github.com/X/X.git/ ':在CONNECT之后从代理收到HTTP代码501
所以,501意味着"没有实施".我对Tor没什么经验(但从现在开始我开始欣赏它),所以不知道用这种方式使用Tor是否真的不可能,或者我做错了.
问:如何配置git通过Tor使用它?