Note |
---|
We are in the process of retiring the SVN service at the beginning of 2015. Please use GitHub instead. |
Overview
The Academic Computing Subversion hosting service is a tool that provides SEAS users, groupgroups, and labs secure, manageable, and centralized access to Subversion repositories. These repositories can be public or private, and control can be managed as needed by their owners.
Creating a repository group
A "repository group" is a collection of Subversion repositories managed by a particular person or group.
Anyone with an active SEAS account may request a Subversion repository group by sending email to achelp@seas.harvard.edu. In your email, please specify the name you would like for the repository group. This may be your username, or it may be the name of a project or research group.
...
Once your repository group has been created, we will send you an email with the command necessary to check out the administrative repository. For a repository group named "bigproject", the command would look like this:
Code Block |
---|
svn co https://source.seas.harvard.edu/svn/bigproject/admin/
|
...
The admin repository is a meta-repository that allows you to control your Subversion repository group. The admin repository contains the following files and directories:
authz
This is the primary configuration file for the repository group. It is a standard Subversion authorization file, described in the Path-Based Authorization section of the Subversion book. This is where you create new repositories and control access to your repositories.
htpasswd
This is a standard Apache "htpasswd" file that can be used to provide access to your Subversion repositories for someone without a SEAS account.
svnbiosis.conf
This configuration file controls certain aspects of your repository group. You will generally not need to edit this file.
keydir
It is possible to access your Subversion repository via ssh instead of using http. This directory is where you would store ssh keys if you were using this mechanism. If you are interested in using ssh for Subversion access, please contact us.
Adding new repositories
You add new repositories to your repository group by adding new stanzas to the authz
file and committing the changes. For example, to add a repository called "niftycode" to your "bigproject" repository group, you would add the following to your authz
file:
Code Block |
---|
[niftycode:/]
lars = rw
|
This grants read/write (rw
) access to all of the niftycode
repository to user lars
. When you commit this change to the server, the server will create the niftycode
repository if it does not already exist.
...
To grant a user "alice" read access to your documents
repository, you might modify the corresponding entry in your authz
file from this:
Code Block |
---|
[documents:/]
lars = rw
|
To look like this:
Code Block |
---|
[documents:/]
lars = rw
alice = r
|
This gives alice
the ability to view all of the documents
repository. If instead you wanted alice
to have access to only the unclassified
directory of the repository, you would instead modify your authz
file to look like this:
Code Block |
---|
[documents:/]
lars = rw
[documents:/unclassified/]
alice = r
|
...
If you will be collaborating with someone from outside of SEAS, you may to create a local account for them in your repository group. The htpasswd
file is where you control local users and groups. The file is a list of lines of the form:
Code Block |
---|
username:password
|
Where password is a password hash. You will typically manage entries in this file using the htpasswd
program, which is part of a standard Apache install. If you do not have access to this program on your local computer, you can connect to login.seas.harvard.edu
and generate entries there:
- Connect to
login.seas.harvard.edu
using ssh. - Run
htpasswd
with the-n
option, like this:
htpasswd -n -m user@somewhere.com
- Enter and confirm the password when prompted, and
htpasswd
will emit a line similar to the following:
user@somewhere.com:$apr1$Phvgf...$w4R6hgDtojkIZnCNjvyzy0
- Paste this line into your
htpasswd
file and commit the changes.
When selecting usernames, we encourage you to always use a person's email address.
Once you have created the user account, granting access is the same as described in the previous section. For example, you might modify your authz
file to look like this:
Code Block |
---|
[documents:/]
lars = rw
user@somewhere.com = r
|
...
If you want to receive an email message when someone commits changes to a repository, you may set the seas:review
property on the repository root directory to a list of email addresses. For example:
Code Block |
---|
$ cd myproject
$ svn propedit seas:review .
...make your changes...
$ svn ci -m 'added reviewers'
|