如何在代理后面使用 git [英] How to use git behind a proxy
本文介绍了如何在代理后面使用 git的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我从代理后面使用 msysgit.正如我在问题中所说的让 git 与代理服务器一起工作
I am using msysgit from behind a proxy. As I said in question Getting git to work with a proxy server
我已将系统变量 http_proxy
设置为一个值.后来我打电话
I have set system variable http_proxy
to a value. Later I call
git config --global http.proxy $http_proxy
但是,如果我调用类似的东西:
However, if I call something like:
git clone git://git.savannah.gnu.org/gnuprologjava.git
它给出了以下错误:
git.savannah.gnu.org[0; 140.186.70.72]: errno=No error
fatal: unable to connect a socket (No error)
推荐答案
如果您使用 http 代理,则应该使用 http git url.Savannah.gnu.org 上的 UsingGit 页面告诉您正确的语法.对于该存储库:
If you're behind an http proxy, you should be using http git urls. The UsingGit page on Savannah.gnu.org tells you the correct syntax for this. For that repo:
git clone http://git.savannah.gnu.org/r/gnuprologjava.git
这篇关于如何在代理后面使用 git的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文