direkt zum Inhalt springen

direkt zum Hauptnavigationsmenü

Sie sind hier

TU Berlin

Page Content

SVN for Users

Not all TU members can use the SVN service since it is linked to the conventional website service. Students in particular are dependant on a department providing the service. For this reason we will describe an alternative usage of subversion using the central storage AFS which can be used by all TU members.


For the use of AFS a provisioned tubIT user account is required. The repositories can be shared with other users but a use without tubIT account is prohibited.

Find out how to install and configure AFS on your computer here.

Notes for Windows users

The following guide employs AFS terminal commands. Although there is a graphical embedment of the rights management in the file explorer you can still use the same commands using command prompt. (Windows+R, enter cmd and press OK). Change to the drive letter you assigned to AFS (e.g. "Z:") and change to your directory (e.g. "cd afs\tu-berlin\...")

The paths specified here all use the normal slash as path delimiter "/afs/tu-berlin.de/". For Windows it is necessary to use the backslash "\\afs.tu-berlin.de\".

There are numerous graphical tools for the use of SVN, such as TortoiseSVN. For the commands given here there is always an equivalent. Depending on tool and language setting the menu points differ and therefore are not specified here. Please see the documentation of your tool if necessary.

SSH connection to TU server
If you want to follow the instructions on a unix system, you can simply login TU network via SSH. Here you have AFS and the required subversion tools.

# ssh USERNAME@sshgate.tu-berlin.de

Main Directory and AFS Rights

Create a folder in your AFS home directory (or in the AFS storage of your department). We will assume the "svn-repos" for the following instructions.

If you want others to access your repository, you need to assign them the correspondent permissions.

CAUTION: There is no simple way of setting recursive access rights. Therefore we recommending creating an AFS group and assigning the rights once before creating the repository. Access rights which have been given one will be inherited to all subfolders. You can assign the access rights later by assigneng users to that group.

Create AFS group
# pts creategroup  your_username:groupname

For the provisioned user tubit-user who wants to create the group diplon the command would look like this:

# pts creategroup -name tubit-user:diplom

Please note: When assigning rights later always use username:name for GROUPNAME for the example above that would be GROUPNAME = tubit-user:diplom

To the folder "svn-repos" you need the l-right (list). If this folder is stored directly in your home directory, you only need to apply the l right to the subordinated folder which is of the same name as your username and the folder "svn-repos". Use the following command in your home directory (Unix):
# fs setacl -dir ./ svn-repos/ -acl GRUPPENNAME l

For the repository folder itself you can either apply the read or write right. (The next step will explain how the repository folder is created)
# fs setacl svn-repos/mein_repository GRUPPENNAME write

Add a user to the group:

Remove a user from the group:

Please note: Since the access to your repository is secured by AFS rights, a further employment of the subversion tools is unnecessary, but can be done anyway.

Create a Repository

Create a directory subordinated to the SVN main folder with your desired name. For linux this would be:

# mkdir svn-repos/mein_repository

Afterwards we set the AFS permissions for the AFS group which should be entitled to access.

# fs setacl svn-repos/mein_repository GROUPNAME write

Now we will create a repository for this folder:

# svnadmin create svn-repos/mein_repository

NOTE: Since version 1.2 FSFS is the standard storage type for repositories. We recommend using FSFS instead of bdb (Berkeley DB) since there are recommendations for not using bdb explicitely for network file systems [1].

Checkout of the Repository

Change to any directory on your PC. Create a "working copy" of the repository with the following command:
# svn checkout file:///afs/tu-berlin.de/home/[erster Buchstabe des Benutzernamens]/[Benutzername]/svn-repos/mein_repository/

Please make sure to type three(!) slashes after file:

Windows users:
Enter the path like this:
file:////afs/tu-berlin/...". This time you can use the normal slash, but after file: four(!) slashes are required.

Alternative via SSH: In case you do not have an AFS installed locally, you can access the repository via SSH using the server sshgate.tu-berlin.de:

# svn co svn+ssh://[ username@ ]sshgate.tu-berlin.de/afs/tu-berlin.de/home/ [first character of username]/[username]/svn-repos/mein_repository/

Please note:
Windows users generally have to enter a SSH client in the configuration file of their SVN client. In the section [tunnel] the option ssh has to point to an existent SSH client, such as Putty.
SSH keys can not be stored for login, since the AFS home directory on sshgate where the SSH key would be located is only available after login.

In the working copy you can create, edit and delete files as you please. The changes will only come into effect after a commit into the repository. Read documentation of Subversion if you are not unfamiliar with the workflow.

Zusatzinformationen / Extras

Quick Access:

Schnellnavigation zur Seite über Nummerneingabe

Auxiliary Functions