Fixing git-svn on OS X El Capitan

When you install a new version of Mac OS X, git svn breaks. This happened with Mountain Lion and Mavericks, it happened with Yosemite. It happens again with El Capitan.

Unfortunately, the old solutions no longer work due to El Capitan’s System Integrity Protection:

$ sudo ln -s /Applications/ /System/Library/Perl/Extras/5.18/SVN
ln: /System/Library/Perl/Extras/5.18/SVN: Operation not permitted

While you can disable SIP, that’s unnecessary in this case.

Here’s how you get git-svn working:

sudo mkdir /Library/Perl/5.18/auto
sudo ln -s /Applications/ /Library/Perl/5.18/darwin-thread-multi-2level
sudo ln -s /Applications/ /Library/Perl/5.18/auto/

You can’t write to /System, but you can still write to /Library.

10 Responses to Fixing git-svn on OS X El Capitan

  1. Ben Pearson says:

    Thanks for the post, saved me a bunch of time!

  2. k1eran says:

    Thank you, that’s was very useful advice.

    Just fyi however, when I copied the text from above, I got a extra hidden char …
    darwin-thread-multi-2level rather than darwin-thread-multi‌-2level

  3. k1eran says:

    lol – I see my attempt to paste the hidden char didn’t work.
    It was a 200C which is I think a ZERO WIDTH NON-JOINER

  4. Brian says:

    Thanks, saved me some time!

  5. Marvin says:

    If you havent installed Xcode but only the commandline tools (with xcode-select –install) then you have to change the path accordingly.

    You can find the correct path with: xcode-select -p

  6. yonatan says:

    thanks! worked like a charm.

  7. Pingback: SourceTree提示Can’t locate SVN/ in @INC

  8. fifman says:

    Thanks very much! Solved my problem perfectly!

  9. Somesh says:

    Thanks a lot. Saved my lot of time and energy :)

Leave a Reply

Your email address will not be published. Required fields are marked *