Setting up the Subversion Client on Mac OS X
by Josh on Jul.05, 2005, under Development, Mac
These instructions will guide you through the process of installing and using the Subversion Client on OS X. Later I’ll do a post on how to setup your own SVN repositories, but for now it’s just how to setup the client to access repositories. The initial setup takes some time, (approx. 20-30 minutes), and you will need to use the Terminal, so pay attention, and we’ll get through this together.
Files Needed
To begin, download the following files:
- Subversion Client - This is the client software used to connect to the server. It’s command-line only. The current version as of this writing is 1.2 - You can download an installer from http://metissian.com/projects/macosx/subversion/
- SCPlugin - Enables integration with the OS X Finder, adding Subversion commands to the Finder context menu.
- svnX - A GUI application that allows browsing of SVN repositories, importing of new projects, checkouts of repositories, etc. The current version available as of this writing is 0.9.5.
Installation
Installation has three main steps. The first “The Subversion Client” is required, but the last two are optional. However, they make using SVN much easier.
The Subversion Client
- Begin by installing the SVN client first. Mount subversion-client-1.2.0.dmg (or whatever version you downloaded), and run the installer package inside. Follow the instructions, and when the install is complete, open Terminal (located in Utilities > Terminal).
- We’ll be using Terminal to verify that Subversion was installed correctly. We’re also going to make SVN easier to access from the command line, to save you some typing in the future is you decide to use SVN that way. To do so, you’ll need to edit your .bash_profile file. This tells the bash shell where to look for Subversion. In this guide, we’ll be using Pico to edit the file. At the command prompt, enter
pico .bash_profile
- Add the following lines to the file:
PATH="/usr/local/bin:/usr/local/subversion/bin:$PATH"export PATH

- Save the file (control-O in Pico)
- Restart Terminal.
- You should now be able to enter
svnat the command prompt, and receive the following output: “Type 'svn help' for usage.” This means that SVN is now installed and ready for you to use via the command-line.

Subversion is fully-functional and can be used only from the command line if you like. I recommend that you spend some time becoming familiar with the command line interface. Some commands can only be issued using the command-line, and you will be able to get a better understanding of how SVN functions. Also, the Subversion tools for Mac are nice, but since the ones used here are still under development, some features are still missing.
Installing SCPlugin
- Follow the installation instructions here: http://scplugin.tigris.org/installation.html
Installing svnX
- Mount svnx.dmg, and drag svnX.app to your Applications folder, or wherever you would like it.
- Open svnX, and open the Preferences panel. Enter the path to your Subversion binaries folder (/usr/local/bin) in the text field, and close the Preferences panel.

- svnX opens with two windows, “Repositories” and “Working Copies”. You’ll need to add a new link to the repository you want to access. Create it by clicking the “+” button in the Repositories window. Give the new link a name, enter the url of the repository, and the username & password given to you for the respository by the system administrator.
Double-click the new link in the list to access the repository. svnX stores your password in clear text, so after you login, erase your password if you do not want it visible. Subversion stores your login information in a cache file elsewhere on your system, so you will not have to enter it each time. You can specify that Subversion does not cache your login information, however this option is only available via the command-line.
You should now be ready to begin using Subversion on your Mac. For additional information on using Subversion and it’s various commands, please consult the documentation available in the Subversion Book
References:
Update: - SC Plugin has at times some issues refreshing the icons in a working copy to correctly show their status. Check out the next entry titled Nudge Your Files In OS X for info on Nudge, a free utility that can help correct this.
As with all my tutorials and other assorted ramblings, I’d love to hear your comments, questions, whatever. Also, if you find a typo or error, let me know so I can fix it.
The following link has nothing to do with SVN, other than it’s the version control software we use at Footnote.com. This is a link to a topic page there that I’ve created about the construction of Disneyland. The link is for a little experiment we have going on how well these links work, and if search engines will pick them up.
November 8th, 2005 on 10:04 AM
Nice post, man!
December 10th, 2005 on 1:20 AM
Dude, you friggin rock!! Awesome post. It’s guys like you that remind why I do this work.
January 12th, 2006 on 2:36 PM
Hi,
!!!! Great post, well documented.
Only question is, where is you subversion server, do you have one on you local machine, if so how do you install a subversion server on OSX?
Thanks
January 13th, 2006 on 1:10 PM
great, quick tutorial Josh.
Do you use/have you setup svn inside xcode?
February 3rd, 2006 on 8:28 AM
Josh, this was one of the best setup tutorials I’ve seen. Each step worked perfectly, now I’m rocking the subversion on my powerbook. thanks
Jim
February 21st, 2006 on 12:01 PM
The client version is not on that site - where can I get it?
Thank you.
April 9th, 2006 on 9:58 PM
So I understand it that you are runnung the server side of subversion on your local machine - is that correct? Does it use up much cpu time when not in active use, and does it use up much space?
Thanks,
-Roy M.
April 25th, 2006 on 6:29 AM
Thanks for the walk-through — I tried several others, and this one is the only one that got it all up and running.
I am not a programmer, but an academic who would like to use version control on my writings. As such, I want to store my work on my local computer (the laptop I use). You mentioned above that you might put out a tutorial on this… as a non-programmer who can only use command-line in a monkey-see monkey-do action, I would really appreciate this myself, and am sure that others would as well.
Thanks again.
May 15th, 2006 on 1:04 PM
I am getting the following errors. Any idea what this is?
subversion/libsvn_wc/log.c:338: (apr_err=155009)
svn: In directory ’sr’
subversion/libsvn_subr/io.c:565: (apr_err=2)
svn: Can’t copy ’sr/.svn/tmp/text-base/README.svn-base’ to ’sr/README.tmp’: No such file or directory
I am thinking of installing subversion from Darwinports. Any tips on uninstalling the client? Do I need to do it manually by reading the file list from the readme file? If so I am a bit unclear on how to delete the files in lib directories. I am new to OSX. Do I need to ldconfig after delete?
Thanks for any help you can give me.
June 13th, 2006 on 12:39 AM
Great tutorial and I got it running. One question though: What’s the URL I need to enter at ‘Installing svnX - step 3′? I tried serveral things like: svn://localhost/Users/dburger/Sites/css_examples/freakin_cool.
I’d like to use svnX to do webdesigns and PHP from my ~/Sites folder. But when I try the above URL I get an error (even with my accounts username and password set) saying it can’t connect: username or password incorrect. But I’ve seen some URL’s like: svn://subdomain.website.org/svn etc. I’m not running a server that has a domain name or anything like it. It’s just a local Mac in a network.
June 13th, 2006 on 5:08 AM
First, you need to have a repository setup locally, with svnserve running. Once you do that, your url would be something like: svn://localhost/repoName.
This tutorial doesn’t cover setting up the SVN server on your Mac, only the client. You can do it, however, I just haven’t had the time to write up any instructions yet.
June 14th, 2006 on 12:36 AM
I’ve got it working now. I used the terminal svnadmin and create commands to import my project to Subversion. But I can’t find any way to do this using svnX. Drag and Drop doesn’t work. svnX can’t import anything. It’s a little time consuming to import project using the terminal commands. Anyway svnX can do this?
After reading the ‘SVN book’ I’m beginning to understand how Subversion and revisions work. Great tool and good tutorial! Keep up the good work. Kind regards from the Netherlands.
July 18th, 2006 on 2:06 PM
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,gssapi-with-mic,password).
subversion/libsvn_client/commit.c:873: (apr_err=210002)
svn: Commit failed (details follow):
subversion/libsvn_ra_svn/marshal.c:255: (apr_err=210002)
svn: Connection closed unexpectedly
Process finished with exit status 1.
August 25th, 2006 on 5:32 PM
I keep trying to install the SCPlugin on my Macbook Pro, the installer prompts me to “upgrade”, then after restrating the Finder, when clicking the SCPlugin in system preferences, I get this error:
“You cannot open SCPlugin preferences pane on this computer. Contact the developer of this software for a newer version.”
I’ve been wracking my brains over this one for the past couple of days, do you have any idea how I can get it to work? Subversion and svnx work fine, I have set up repos locally, and do versioning. I just want the convenience of using the Finder for Subvesion. Any help will be greatly appreciated!
August 25th, 2006 on 8:07 PM
After surfing some more, I found out I had to have the MacIntel version of the SCPlugin. Already tried these to no avail:
http://www.nabble.com/SCPlugin-on-MacIntel-t1768829.html
http://studiofunk.com.au/downloads/SCPlugin-Intel.zip
August 27th, 2006 on 5:19 PM
I’m not sure if this plugin is available as a Universal Binary yet. To be honest, I haven’t been using it for a while now, and I’ve never tried it on an Intel-based Mac. You may want to try contacting the author of the plugin about getting it to work on you MacBook.
September 19th, 2006 on 2:22 PM
Josh:
Just a short note of thanks for this excellent tutorial. I am new to subversion, and this was exactly what I needed to get me over the hump. Thanks again for the time and effort.
October 24th, 2006 on 4:31 AM
Thank you Josh. I tried several times to come in contact with sbv but never got it right. But this easy to understand Tutorial helped realy.
November 20th, 2006 on 11:01 PM
Thank you so much for this. It gave me that last little bit of info that I could not find anywhere else!
December 18th, 2006 on 3:24 PM
well, I made all fine so far until this:
Now, right click on any folder to start “Subversion > Checkout”.
-> when I do this and add the url of one sourceforge project I, it asks me username and password and then it comes only a blank screen… nothing really happens.
December 18th, 2006 on 3:40 PM
I tried this SvnX as well and that on the other hand complains that the certificate of sourceforge is not trusted and thus can’t proceed.
Looks like too complicated thing to do this SVN…
December 19th, 2006 on 11:04 AM
Awesome tutorial. How can I make it work with svn+ssh://xxx I’ve tried and failed many times and really need access to this repository. I have the right credentials since I can use ssh directly and login remotely to the site… but never through svnx. Help.
December 21st, 2006 on 2:46 AM
Hi there. I installed svn folowing instructions on another site, and i didn’t know what I was doing. I think it was working but then I did something (don’t know what) and broke it. Now I’m trying to use your instruction (which make sence to me), but something is not working.
When I do the “pico” comand it launches GNU nano 1.2.4
then after the rest of the svn instal when I relaunch the terminal and enter svn in the terminal I get the following error:
-bash: svn: command not found
How can I uninstall and start over, or fix this.
December 21st, 2006 on 3:28 AM
ive gone through this whole process twice but keep getting errors after logging in.
apr_err=170001
anyone had this occur? it is amid 2 paragraphs of error description i cant decipher
December 22nd, 2006 on 7:22 PM
Thank you for this great tutorial. I got all the way to the part when I double click the URL but then I get the following error message :
subversion/libsvn_ra_local/ra_plugin.c:285: (apr_err=180001)
svn: Unable to open an ra_local session to URL
subversion/libsvn_ra_local/split_url.c:125: (apr_err=180001)
svn: Unable to open repository ‘file:///Users/multi/Documents/Development’
: (apr_err=180001)
svn: Unable to open an ra_local session to URL
subversion/libsvn_ra_local/split_url.c:125: (apr_err=180001)
svn: Unable to open repository ‘file:///Users/multi/Documents/Development’
Tried a number of things but no luck. Any ideas?
thanks
January 19th, 2007 on 7:41 PM
Thanks for this, i finally have SVN working in a fashion i can understand, rather than command line which always flummoxed me. Thanks very much.
February 7th, 2007 on 9:05 AM
The directions on installing SCPlugin are out of date (they’re for version 0.5, we have released 0.6). We’ve made progress on a massive rewrite, with a lot of cool benefits. We do not yet have an installer, but we do have a download (in the place you already link). The new version does not need the System Preferences panel, nor the external Framework; it’s all self-contained in the one bundle.
No installer, yet, but all you need to do is drag the bundle into
/Library/Contextual Menu Items/
March 2nd, 2007 on 10:37 AM
This article just made my life oh-so-better. Thanks so much for taking the time to post it.
March 15th, 2007 on 10:55 AM
@jackr - I’ve been noticing that there is actual traffic on the mailing lists now - that’s great. The latest build of SCPlugin is great as well. A BIG improvement. I’ve udpated the post accordingly.
March 25th, 2007 on 10:33 PM
I’m install success by myself,
hm, but the same question : how can i uninstall the “Subversion Client on OS X” ?
just delete the files from package list?
May 2nd, 2007 on 11:16 AM
Hi the tutorial works great. I have it up and running. However I ran into a commit issue - Each time I try to commit, I get an error subversion/libsvn_client/commit.c:873:
(apr_err=170001)
svn:Commit failed (details follow):
subversion/libsvn_client/client.c:309:
(apr_err=170001)
svn: Can’t get password.
Any help would be appreciated.
May 23rd, 2007 on 8:20 AM
FYI if your on Mac OS X (im on 10.3.9) and using svn+ssh then it won’t read the .bash_profile on the server side. I had to put info into .bashrc instead….
October 25th, 2007 on 10:34 AM
I would like to know where the .bash_profile file is located.
October 25th, 2007 on 10:50 AM
nevermind, I fixed it. good post by the way
October 16th, 2008 on 10:33 AM
In the Finder, under the Go->Connect to Server menu, you can type in the url to your svn depot and it will mount as a volume on the Desktop. You don’t get all the features of a rich svn client, but … how cool is that!
January 28th, 2009 on 1:25 AM
Many thanx Josh. I am a long time Windows user that has been hooked on TortoiseSVN for years but now that I got the client working on my mac this will help wean me off the PC.