git svn - Unrecognized URL scheme error

后端 未结 4 732
慢半拍i
慢半拍i 2021-01-08 00:58

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 i         


        
4条回答
  •  清歌不尽
    2021-01-08 01:58

    This is probably related to incompability of SVN::Core perl library or XCode commandline tools update.

    You can try to upgrade it locally:

    cpan SVN::Core
    

    or globally:

    sudo cpan SVN::Core
    

    or if you're using brew, try to install it via brew:

    brew install --perl subversion
    brew reinstall git
    

    If it still doesn't work, please check our PERL5LIB variable:

    echo $PERL5LIB
    

    if it's set to something that you don't want, you can unset it for testing:

    unset PERL5LIB
    

    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.

    export PERL5LIB="/Users/my_user/perl5/lib/perl5:/Library/Perl/5.16:/Applications/Xcode.app/Contents/Developer/Library/Perl/5.16"
    

    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:

    sudo /usr/libexec/locate.updatedb # Only for the first time
    locate Core.pm | grep Core.pm$
    

    Related articles:

    • Solved: git svn Broken in Mavericks (or Mountain Lion)
    • Using the PERL5LIB environment variable
    • How can I add a directory to the Perl library path at the system level?
    • Alien-SVN

提交回复
热议问题