git svn - Unrecognized URL scheme error
Solution 1
Apparently you have two different versions of Subversion binaries and one of those versions does not support http(s)://
protocol.
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
or
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
- handles 'http' scheme
- handles 'https' scheme
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:
If
svn --version -q
prints1.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 ofgit-svn
support SVN 1.7.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.
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.
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
or
$ brew remove git
$ brew install git
Or with MacPorts something like this:
$ port install subversion-perlbindings
or
$ port upgrade git-core +svn
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.
Hope that helps.
Solution 2
Can you do: git svn --version
See this question: How to upgrade the SVN version used by git-svn
UPDATE
Please note that this answer was in response to the posters original version of the question where the issue may have been related to using an older version of svn
in git-svn
. The poster has since upgraded git, determined that it wasn't the cause, and adjusted the question to reflect that.
Related videos on Youtube
Eugene
Updated on September 16, 2022Comments
-
Eugene over 1 year
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/
works just fine.I've re-run
cpan SVN::Core
and install finished fine, but still getting the error.
-
Eugene over 11 yearsbash-3.2$ git svn --version git-svn version 1.7.7.5 (Apple Git-26) (svn 1.6.17)
-
Eugene over 11 yearsIs it old? Can it be a problem?
-
Mightymuke over 11 yearsI wouldn't have thought so, but you could try installing git 1.8 as that now supports svn 1.7. That might fix your issue.
-
Mightymuke over 11 yearsYour issue looks similar to this? git.661346.n2.nabble.com/…
-
Mightymuke over 11 yearsPossibly related: If you are using homebrew for OS X then make sure you install package svn, not subversion.
-
VinceStyling about 6 yearsgreat, the
git svn --version
output is "git-svn version 2.10.1 (svn 1.8.11)", so I reinstall git solved my problem viabrew reinstall git
, now the output of "git version" print git-svn version 2.17.0 (svn 1.7.20)