不能在代理后面做 git-svn fetch [英] Cannot do git-svn fetch behind proxy
问题描述
我正在尝试使用 git-svn 镜像 svn 存储库.
我在做
git svn clone http://worldwind31.arc.nasa.gov/svn/trunk/WorldWind
我得到了
在 f:/gstest/WorldWind/.git/中初始化空 Git 存储库RA 层请求失败:/svn/trunk/WorldWind"上的 PROPFIND 请求失败:/svn/trunk/WorldWind"的 PROPFIND:无法连接到位于/usr 的服务器 (http://worldwind31.arc.nasa.gov)/lib/perl5/site_perl/Git/SVN.pm 第 148 行
如果我在不在代理中的另一台计算机上做同样的事情,那就没问题了.
我使用的是 win7,我已经设置了 $HTTP_PROXY
、http.proxy
(git 中的全局代理)和 $HOME/AppData/Roaming/Subversion/servers
到正确的代理.
在 shell 中执行 svn checkout [repo adress]
有效.在 shell 中执行 wget [repo adress]
是有效的.但不是 git svn clone [repo 地址]
有什么想法吗?我在此发现的大多数问题都指向 Subversion/servers
文件,但现在我已经编辑了该文件,但问题仍然存在......:/
我遇到了完全相同的问题.
解决方案是找到正确的 Subversion 配置目录.至少在我的情况下,本机 svn.exe
使用文件 C:UsersMYUSERAppDataRoamingSubversionservers
,但是 git-svn
使用 ~/.subversion/servers
.我的意思是这个路径 ~/.subversion/servers
在 Git Bash shell 中,其中 ~
被扩展到正确的位置.以与 svn.exe
使用的另一个相同的方式编辑 ~/.subversion/servers
,然后 git svn clone
应该可以工作.>
简而言之,关键是找到要编辑的正确配置文件,因为您可能在 Windows 中拥有多个配置文件.
I'm trying to mirror a svn repo using git-svn.
I'm doing
git svn clone http://worldwind31.arc.nasa.gov/svn/trunk/WorldWind
And I'm getting
Initialized empty Git repository in f:/gstest/WorldWind/.git/
RA layer request failed: PROPFIND request failed on '/svn/trunk/WorldWind': PROPFIND of '/svn/trunk/WorldWind': could not connect to server (http://worldwind31.arc.nasa.gov) at /usr/lib/perl5/site_perl/Git/SVN.pm line 148
If I do the same on another computer that isn't within the proxy it's ok.
I'm on a win7, and I've set $HTTP_PROXY
, http.proxy
(the global one in git) and $HOME/AppData/Roaming/Subversion/servers
to the correct proxy.
Doing svn checkout [repo adress]
in a shell works.
Doing wget [repo adress]
in a shell works.
But not git svn clone [repo adress]
Any ideas? Most of the questions I've found on this points me to the Subversion/servers
file, but now I've edited that one and the problem is still there... :/
I had the exact same problem.
And the solution is finding the correct Subversion configuration directory. At least in my case the native svn.exe
uses the file C:UsersMYUSERAppDataRoamingSubversionservers
, but git-svn
uses ~/.subversion/servers
. And I mean this path ~/.subversion/servers
in the Git Bash shell, where ~
is expanded to the right location. Edit ~/.subversion/servers
the same way as the other one used by svn.exe
and then git svn clone
should work.
In short, the key is finding the right configuration file to edit, as you may have multiple of them in Windows.
这篇关于不能在代理后面做 git-svn fetch的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!