ISS Subversion Service

The ISS Unix team run a public Subversion server. Subversion is an open-source version control system, similar to CVS but with more features and better networking support. The service is available to all users with an ISS Unix account.

This information is a very brief guide to getting started with Subversion. We thoroughly recommend you read the Subversion book to fully understand how to use Subversion.

Getting Started

First, make sure you have an active ISS Unix account. To create your Subversion repository, either use one of the ISS Linux Workstations or use SSH to remotely log into finan.ncl.ac.uk. Subversion is not currently available on aidan.

Create the Subversion repository in your home directory:

$ svnadmin create $HOME/public_svn

Once this has been done send an email to helpline@ncl.ac.uk asking for the Unix team to enable your Subversion repository. Note that if you later delete the public_svn directory and then re-create it you will have to ask for it to be enabled again.

When your repository has been activated and you have configured access controls (explained below) it is then available through the following URL:

https://isssvn.ncl.ac.uk/svn/<userid>

Setting Up Access Controls

You now need to configure access permissions to your repository. By default nobody has access. To allow anonymous read-only access to the entire repository add the following to a file called .svn-access in the public_svn directory:

[/]
* = r

Once you've created a username and password for yourself (explained below) you can give yourself read-write access, eg:

[/]
* = r
jim = rw

This section of the Subversion book has more information on further customising your .svn-access file.

Now create usernames and passwords to access your repository. You can create as many usernames for your repository as you need (for example, if you want to give access to more than one person). Add each user into a file called .svn-users in the public_svn directory you just created. Example:

jim:$apr1$zwAGM...$QUgyHdYLfsqR4I8h6dgaU/
bob:$apr1$7OC.s/..$F1CnMRW1pGY3eBDGNqJEi/
Note the format of this file, the username comes first, followed by a colon, followed by the password in MD5 crypted form. You can use this page to generate the encrypted passwords which you can then paste into your .svn-users file.

Importing Your First Files

Before you start importing files into your new repository you should think about how you want the repository to be laid out. It's possible to use any layout but as a basic starting point we recommend a tree similar to this:

Repository Top
 |
 |- project1
 |     |
 |     |- subdirs, files, etc
 |
 |- project2
       |
       |- subdirs, files, etc

This layout would allow you to assign individual access controls to each project using your .svn-access file. You may also wish to subdivide each project directory into sub trees to allow branching of project revisions. This section of the Subversion book is an excellent guide to creating the layout of your repository.

Once you have created the layout of your initial repository on disk you can import it into your Subversion repository. For example, you have created the following directory structure in your home directory:

myprojects/
 |
 |- project1/
      |
      |- trunk/
      |    |
      |    |- (current working files, directories, etc)
      |- tags/
      |- branches/

You can then import this by using the svn import command. Eg:

$ cd $HOME/myprojects/
$ svn --username jim import . https://isssvn.ncl.ac.uk/svn/nuser/

At this point vi (or whatever your EDITOR environment variable is set to) will be started for you to enter a log message, in this case something along the lines of "Initial import." should be sufficient. Save and exit the editor and the import should start. Example:

Authentication realm:  nuser Subversion Repository
Password for 'jim': 
Adding         project1/trunk
Adding         project1/trunk/file1.c
Adding         project1/trunk/file2.c
Adding         project1/trunk/info.txt
Adding         project1/branches
Adding         project1/tags

Committed revision 1.

The first time you use your repository you may see the following message:

Error validating server certificate for 'https://isssvn.ncl.ac.uk:443':
 - The certificate is not issued by a trusted authority. Use the
   fingerprint to validate the certificate manually!
Certificate information:
 - Hostname: isssvn.ncl.ac.uk
 - Valid: from Nov 10 10:21:57 2005 GMT until Nov 10 10:21:57 2006 GMT
 - Issuer: Information Systems & Services, University Of Newcastle Upon Tyne, Newcastle Upon Tyne, Tyne & Wear, GB
 - Fingerprint: 12:41:35:77:8a:7f:9a:3d:40:94:80:ba:c6:0e:b9:63:59:3d:e4:eb
(R)eject, accept (t)emporarily or accept (p)ermanently?

This is because we use a self-signed SSL certificate on the Subversion server. Enter 'p' here to accept the warning and not be warned about it again.

Further Information


Return to Unix support home page.