I\'m using OSX and want get a svn repo into a local git repo using sourcetree
.
When I add a bookmark using sourcetree using SVN URL, thus sourcetree<
I've found that the best solution is to expand the list of directories in @INC
using an export
export PERL5LIB=/Applications/Xcode.app/Contents/Developer/Library/Perl/5.18
Referenced from: https://perlmaven.com/how-to-change-inc-to-find-perl-modules-in-non-standard-locations
Plus to the highest answer, If you are using souceTree, simply paste command line may not work immediately. In that case, you may need to check git used in your sourceTree, which should be set as System git.
Or, if you don't have Xcode
, just CommandLineTools
(this is on ElCapitan 10.11.6
):
sudo ln -s /Library/Developer/CommandLineTools/Library/Perl/5.18/darwin-thread-multi-2level/SVN /usr/local/git/lib/perl5/site_perl/5.18.2/darwin-thread-multi-2level/SVN
sudo ln -s /Library/Developer/CommandLineTools/Library/Perl/5.18/darwin-thread-multi-2level/auto/SVN /usr/local/git/lib/perl5/site_perl/5.18.2/darwin-thread-multi-2level/auto/SVN
If you previously linked some older version or just made a mistake so it gives you: File exists
, then you should first do
sudo unlink /usr/local/git/lib/perl5/site_perl/5.18.2/darwin-thread-multi-2level/SVN
for whichever file was reported as already existent, of course.
EDIT Dir doesn't exist: (suggested by @rogeriopradoj)
mkdir -p /usr/local/git/lib/perl5/site_perl/5.18.2/darwin-thread-multi-2level
EDIT Sierra:
After upgrading to Sierra I lost CommandLineTools
, so I just had to reinstall it and everything was back to normal.
This will prompt you to install just the CommandLineTools
, not the whole XCode
.
xcode-select --install
Hope this helps someone :)
The solution for me was to delete the password entry in the OSX key ring app, and have git svn re-create it. My key entry has been created earlier (by svn I suppose), and it seems that git cannot use this key entry (nor fix it nor add a second one).
The long story: I noticed that when unsing "system git" in SourceTree, there seemed to be a problem storing the credentials. When I entered the same git command (that SourceTree is issuing) on the command-line, git kept prompting me for my password each time.
Then I found https://stackoverflow.com/a/39800112/580672
If you are interested, my setup was:
I had tried with no success:
All without success. The solution was system git and the key entry, as stated above.