git svn-无法识别的网址方案错误 [英] git svn - Unrecognized URL scheme error

查看:137
本文介绍了git svn-无法识别的网址方案错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在尝试使用git svn克隆svn rep时出现以下错误:

I'm getting the following error on attempt to clone svn rep with git svn:

eugene$ git svn clone https://my.site/svn/ here
Initialized empty Git repository in /Users/eugene/Documents/workspace/test/here/.git/
Bad URL passed to RA layer: Unrecognized URL scheme for 'https://my.site/svn' at /usr/local/git/lib/perl5/site_perl/Git/SVN.pm line 148.

svn checkout https://my.site/svn/正常工作.

我已经重新运行

cpan SVN::Core

并完成安装,但仍然出现错误.

and install finished fine, but still getting the error.

推荐答案

显然,您有两个不同版本的Subversion二进制文件,其中一个版本不支持http(s)://协议.

Apparently you have two different versions of Subversion binaries and one of those versions does not support http(s):// protocol.

如果运行svn --version,则输出应包含以下内容:

If you run svn --version the output should include something like this:

* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
  - handles 'http' scheme
  - handles 'https' scheme

* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
  - handles 'http' scheme
  - handles 'https' scheme

问题是git-svn不使用相同的二进制文件.相反,它使用已编译的另一种SVN版本,不支持http(s)://协议.可能有不同的原因:

The problem is that git-svn does not use the same binaries. Instead it uses another version of SVN that compiled with no support for http(s):// protocol. There may be different reasons for that:

  1. 如果svn --version -q打印1.7.x,则很可能是您的Git安装太旧,无法使用此版本的SVN.因此,您可能需要升级它,因为git-svn的最新版本支持SVN 1.7.

  1. If svn --version -q prints 1.7.x, most probably your Git installation is too old to use this version of SVN. So, you might want to upgrade it as latest versions of git-svn support SVN 1.7.

如果您的默认SVN安装未安装Perl绑定,则SVN :: Core将使用不支持http(s)的二进制文件作为后备.因此,您可能要为SVN启用Perl绑定.

If your default SVN installation has no Perl binding installed, SVN::Core uses the binaries with no http(s) support as a fallback. So, you might want to enable Perl bindings for SVN.

最后,由于Perl模块,PATH/LD_LIBRARY_PATH或PERL5LIB(或任何git-svn用于查找库的东西-我在这里不是专家)的某些错误配置,git-svn仅使用了无效的二进制文件. /p>

Finally, due to some misconfiguration of Perl modules, PATH/LD_LIBRARY_PATH or PERL5LIB (or whatever git-svn uses to find the libraries — I'm no expert here), git-svn just uses invalid binaries.

解决此问题的具体步骤取决于您管理软件包的方式,例如用Homebrew看起来像这样:

The particular steps on fixing the issue depend on how you manage the packages, e.g. with Homebrew that'd look like this:

$ brew remove svn
$ brew install --with-perl svn

$ brew remove git
$ brew install git

或者使用MacPorts这样的东西:

Or with MacPorts something like this:

$ port install subversion-perlbindings

$ port upgrade git-core +svn

之后,尝试指定正确的库路径.例如.如果which svn打印/usr/local/bin/svn,请尝试将/usr/local/lib用作Perl模块的库路径.

After that try to specify a proper library path. E.g. if which svn prints /usr/local/bin/svn, try to use /usr/local/lib as a library path for Perl modules.

希望有帮助.

这篇关于git svn-无法识别的网址方案错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆