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.
This is probably related to incompability of SVN::Core perl library or XCode commandline tools update.
You can try to upgrade it locally:
or globally:
or if you're using brew, try to install it via brew:
If it still doesn't work, please check our PERL5LIB variable:
if it's set to something that you don't want, you can unset it for testing:
If that helps, find the file which is defined (e.g. ~/.profile) and remove it from there.
If you've multiple perl libraries, you can specify PERL5LIB environment variable in your
~/.profile
file, e.g.Sometimes the problem simply lays in pointing PERL5LIB to the older version of perl library, e.g. 5.12 instead of 5.16.
The easy way to find your all instances of SVN::Core, you may try:
Related articles:
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:or
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:
or
Or with MacPorts something like this:
or
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.
When I encountered this error again after upgrade MacOS to Mojave, I think I can also do the trick as I did before by
brew reinstall git
, just like I commented on the accepted answer.but I failed unfortunately. Any others information I searched can't give me help. So I uninstall git completely by truncate the install artifacts.
now install the lastest version of git/git-svn via brew :
when install finish, I enter my project's root dir and examine whether it can work or not :
the git-svn pull information ended up show me, which means it worked again.
now the version infos is :
before is :
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
ingit-svn
. The poster has since upgraded git, determined that it wasn't the cause, and adjusted the question to reflect that.