Website:Subversion

From UGCS
(Difference between revisions)
Jump to: navigation, search
m (reformat)
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=Subversion=
+
==Status==
 +
Pending code review, this service is ready to be considered beta, meaning we know of no reason it wouldn't be stable but it is not yet thoroughly tested.
 +
==For Users==
 +
NOTE: Should you ever get "Connection Refused" when attempting to access svn, just try again in a minute. svn has to restart somewhat often and if you happen to hit it in small window it will be down.
  
Please note: this is not an introduction/howto for Subversion in general; you should [http://www.google.com/search?q=subversion+tutorial google] for that. This is how to set up and begin using a Subversion repository on the UGCS cluster.
+
===Configuration===
 
+
To set up your subversion on UGCS:
To create a svn repository, run this on the cluster:
+
* Make the directory ~/public/svn, if it doesn't already exist (mkdir ~/public/svn)
<pre>svnadmin create ~/public/svn</pre>
+
* Give user svn permissions on it (fs sa ~/public/svn svn rlidwka)
 
+
* Create/move repositories somewhere under ~/public/svn
By default, anyone will be able to check out the code but only you will be able to edit it. In order to allow others to edit it you will need to grant them rlidw permissions, and in order to allow others to read it you will need to grant them rl permissions. To make a repository private, do not give anyone any other privileges (eg by creating in your ~ instead of in public).
+
* Set up users and permissions in ~/public/svn/REPOSITORY/conf [see below for help]
 
+
* Access your repository ~/public/svn/REPOSITORY at any of the following:
To change permissions, run:
+
** svn://svn.ugcs.caltech.edu/USERNAME/REPOSITORY
<pre>fs setacl <folder> <user> <permissions></pre>
+
** svn://svn.ugcs.caltech.edu/~USERNAME/REPOSITORY
 
+
** svn://svn.ugcs.net/USERNAME/REPOSITORY
eg, to let anyone check in or out code:
+
** svn://svn.ugcs.net/~USERNAME/REPOSITORY
<pre>fs sa ~/public/svn system:authuser rlidw</pre>
+
* NOTE: Make sure you use fsfs for the storage mechanism when creating the repository. This is currently the default, but you can pass --fs-type fsfs to svnadmin to be on the safe side. If you don't know what this means, just follow the above directions and you'll be fine.
 
+
===Tutorial===
Once you have created a repository, you can access it from any computer as follows:
+
* If you don't have it already, create ~/public/svn. and type: fs sa ~/public/svn svn rlidwka
 
+
* Anything in ~/public/svn will be accessible at svn://svn.ugcs.caltech.edu/USERNAME. You can also use svn://svn.ugcs.net/USERNAME. A tilde before the username is optional but not required.
<pre>svn co svn+ssh://calliope.ugcs.caltech.edu/afs/.ugcs/user/<username>/public/svn</pre>
+
* To create a new repository in less than two minutes:
 
+
** type: cd ~/public/svn
replacing co with whatever SVN operation you want, and the path above with the path to your repository
+
** type: svnadmin create REPOSITORYNAME --fs-type fsfs
 +
** type: cd REPOSITORYNAME/conf
 +
** edit the file passwd. At the bottom, in the users section, add one line per person who needs to be able to access the server. Each line is formatted like USERNAME=PASSWORD. Don't forget to include one for yourself.
 +
** edit the file svnserve.conf. Add the following under the [general] section:
 +
*** anon-access = none # Can also be read or write to let anyone in the world perform that op.
 +
*** auth-access = write # Can also be read or none to control what users in the passwd file can do. Write permission implies read permission
 +
*** password-db = passwd
 +
** Done! You can access your new repository at svn://svn.ugcs.caltech.edu/USERNAME/REPOSITORYNAME
 +
** Note: You will need to add an entry for yourself in the passwd file as well, it is NOT the same as your ugcs password. DO NOT REUSE YOUR UGCS PASSWORD! Since you only have to enter the svn password once on your computer (svn will remember it for that repository), the first time you access the repository on a given machine, choose something strong; you can always check the passwd file later if you forget.

Latest revision as of 07:33, 2 May 2009

Contents

Status

Pending code review, this service is ready to be considered beta, meaning we know of no reason it wouldn't be stable but it is not yet thoroughly tested.

For Users

NOTE: Should you ever get "Connection Refused" when attempting to access svn, just try again in a minute. svn has to restart somewhat often and if you happen to hit it in small window it will be down.

Configuration

To set up your subversion on UGCS:

Tutorial

  • If you don't have it already, create ~/public/svn. and type: fs sa ~/public/svn svn rlidwka
  • Anything in ~/public/svn will be accessible at svn://svn.ugcs.caltech.edu/USERNAME. You can also use svn://svn.ugcs.net/USERNAME. A tilde before the username is optional but not required.
  • To create a new repository in less than two minutes:
    • type: cd ~/public/svn
    • type: svnadmin create REPOSITORYNAME --fs-type fsfs
    • type: cd REPOSITORYNAME/conf
    • edit the file passwd. At the bottom, in the users section, add one line per person who needs to be able to access the server. Each line is formatted like USERNAME=PASSWORD. Don't forget to include one for yourself.
    • edit the file svnserve.conf. Add the following under the [general] section:
      • anon-access = none # Can also be read or write to let anyone in the world perform that op.
      • auth-access = write # Can also be read or none to control what users in the passwd file can do. Write permission implies read permission
      • password-db = passwd
    • Done! You can access your new repository at svn://svn.ugcs.caltech.edu/USERNAME/REPOSITORYNAME
    • Note: You will need to add an entry for yourself in the passwd file as well, it is NOT the same as your ugcs password. DO NOT REUSE YOUR UGCS PASSWORD! Since you only have to enter the svn password once on your computer (svn will remember it for that repository), the first time you access the repository on a given machine, choose something strong; you can always check the passwd file later if you forget.
Personal tools