Howto: SVN+SSH with multiple users and password less logins (Part 3)

Posted by Luca on January 18th

Welcome back! Sorry about the delay, but things have been hectic with this revision lark I am supposed to be doing. This is the third part of my SVN+SSH with multiple users and password less logins tutorial. In the first part we looked at how to setup the command line SVN client to allow multiple users to access a Subversion repository via SVN+SSH. In the second part we looked at setting up password less logins with an SSH agent and public-private key authentication. This final tutorial will look at setting up a graphical SVN client to use all of this.

What you need
On Windows I suggest you use Tortoise SVN (made by the same people who make Subversion) and on OS X I suggest you use svnX. Tortoise SVN integrates very nicely into Windows Explorer and provides you with near enough all of the functions of the command line SVN client. Unfortunately svnX doesn’t integrate the same way into Finder, and has a few bugs in places. I will go into these a bit later when I cover OS X.

Windows
TortoiseSVN is nice and easy to install, just download the installer from the website and then run it. Simple as that! Before we start, if you have not already, open up Pageant and load up your private keys. If you can’t remember how have a look at the last tutorial.

Not to checkout a working copy from the repository. First create a directory somewhere to store the working copy with Windows Explorer. If you right click on this folder you will see a copy of new items on the menu, these are for Tortoise SVN. From the list select SVN Checkout.

In the URL for repository, enter the URL you used in the first tutorial and click the OK button.


svn+ssh://[your-username]@[your-domain]/[path-to-repo]/

You will now get a new window popup, and depending on the speed of your connection it may take a while before anything happens. When it starts all of the files in the repository will be listed and checked-out. When it has finished it will say it has completed.

If you now open this folder you will see all the files you have checked out. The file and folder icons will have another icon on top which shows the status of the file. If it is a green tick it means that is the latest version, if there is a red exclamation mark it means changes have been made to that file that have not been committed. If you want to revert these changes right click on the file and from the Tortoise SVN menu select Revert.

If you want to add a new file or folder to the working copy right click on it and from the Tortoise SVN menu select Add. Once you have made the changes you want to commit them right click on the top folder and from the menu select SVN Commit. The top box allows you to enter a commit message and the bottom box allows you to select which files to commit.

More information about how to use Tortoise SVN can be found in the online manual.

OS X
svnX, as with any other OS X application, is easy to install. Just drag it to Applications or wherever you want it. svnX has a rather easy to get confused layout, so if you can’t see the window you are looking for have a look in the Window menu item. Also if you haven’t already open SSHKeychain and add your private keys. If you can’t remember how have a look at the last tutorial.

First open up the Repositories window where we need to add your repository. The name can be anything you want, then in the path enter the URL you used in the first tutorial. Next double click on the new entry in the list and hopefully your repository should be listed!


svn+ssh://[your-username]@[your-domain]/[path-to-repo]/

To checkout a working copy click the svn checkout button at the top and then select a folder to check it out to. Once you have done this the Working Copies window should appear and list your working copy. If you look at the activity bar at the bottom of the window for your repository you can see when it has finished checking out (it will dissapear). If you now double click on the entry for your working copy you can close the rest of the windows.

This window will list any changes (if any) made to the repository. A question mark means that file or folder has been added, an exclamation mark means it is missing. In this case either click the add or remove button to make changes, and then the question mark changes to an A and the exclamation mark changes to a D. If a file has been modified it will have an M next to it.

Now to commit the changes you need to select all the files you want to commit - I know it sounds silly but I keep forgetting to select all the files and it is really annoying - and then click the commit button. A box will popup asking for your commit message and then click Commit to save it. If you want to revert any changes select the file to revert and click the Revert button!

Now hopefully you should be up and running with a good version control system! If you have any problems or any other questions don’t hesitate to leave a comment below! The same applies if I forget anything or made a big mistake!

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment