![]() |
|
||||||||
|---|---|---|---|---|---|---|---|---|---|
|
|
Creating a new repository take place in several steps. In the first step we initialize the repository. In the following steps you have to set access permissions for the different kind of users. The following example demonstrates how to create a new
repository for a project cd /afs/psi.ch/project/linux pts creategroup linux_adm:svn_adm -owner linux_adm
The access rights depend on ACL's as defined for the AFS directories of your repository. Use the fs listacl command to show ACL's, e.g.: cd /afs/psi.ch/project/linux fs listacl . A typical output may look as follows:: Access list for . is Normal rights: linux rlidwk linux_adm rlidwka In this case all members of the group
To grant all users within an AFS group read and write access to a repository, set the ACL's as follows: cd /afs/psi.ch/project/linux/svn/ pts creategroup linux_adm:svn_rw -owner linux_adm:svn_adm
The user needs a valid AFS token to access the repository The configuration for read/write access via the gateway is the same as for direct read/write access. You will be ask for your AFS password. To grant all users inside an AFS group read-only access to a repository, set the ACL's as follows: cd /afs/psi.ch/project/linux/svn/ pts creategroup linux_adm:svn_ro -owner linux_adm:svn_adm
The user needs a valid AFS token to access the repository Direct anonymous read-only access is not recommended! There are some problems with anonymous read access to a Subversion repository on AFS. The biggest problem is that Subversion must be able to set locks in some files - even for a checkout. Thus any malicious user in the world with an AFS client may set any locks in these files and lock out all other users from using the repository. The recommended solution is to access the repository via a gateway with CVS over SSH. If anonymous read-only access via the
gateway is needed, then you have to set ACL's for the "user"
cd /afs/psi.ch/project/linux/svn/
find . -type d -noleaf -exec fs setacl {} -acl savannah rl \;
fs setacl locks -acl savannah rlkSupose we have the repository
find /afs/psi.ch/project/linux/svn -noleaf -type d -exec fs listacl {} \;This will give the output: Access list for /afs/psi.ch/project/linux/svn/ is Normal rights: linux_adm:svn_adm rlidwka linux_adm:svn_rw rlidw savannah rl Access list for /afs/psi.ch/project/linux/svn/dav is Normal rights: linux_adm:svn_adm rlidwka linux_adm:svn_rw rlidw savannah rl Access list for /afs/psi.ch/project/linux/svn/locks is Normal rights: linux_adm:svn_adm rlidwka linux_adm:svn_rw rlk savannah rlk Access list for /afs/psi.ch/project/linux/svn/hooks is Normal rights: linux_adm:svn_adm rlidwka linux_adm:svn_rw rlidw savannah rl Access list for /afs/psi.ch/project/linux/svn/conf is Normal rights: linux_adm:svn_adm rlidwka linux_adm:svn_rw rlidw savannah rl Access list for /afs/psi.ch/project/linux/svn/db is Normal rights: linux_adm:svn_adm rlidwka linux_adm:svn_rw rlidw savannah rl Access list for /afs/psi.ch/project/linux/svn/db/revs is Normal rights: linux_adm:svn_adm rlidwka linux_adm:svn_rw rlidw savannah rl Access list for /afs/psi.ch/project/linux/svn/db/revprops is Normal rights: linux_adm:svn_adm rlidwka linux_adm:svn_rw rlidw savannah rl Access list for /afs/psi.ch/project/linux/svn/db/transactions is Normal rights: linux_adm:svn_adm rlidwka linux_adm:svn_rw rlidw savannah rl This is the case if you are working at PSI and have a working AFS connection, from either Linux or Windows clients. Since the repository is seen within the normal global file system structure you just need to use your normal subversion client using a file URL, e.g.: svn list file:///afs.psi.ch/project/linux/svn/trunk svn co file:///afs/psi.ch/project/linux/svn/trunk In this case you have to use the Savanna gateway system and use
the svn co svn+ssh://johnsmith@savannah/afs/psi.ch/project/linux/svn/trunk johnsmith@savannah's password:... Just enter your normal AFS password. For anonymous access you can use the account
In addition to using the command line there are also GUI based subversion tools available: For Linux clients the programs eSvn and rapidsvn exist.(More info to be added here) For Windows clients the program TortoiseSvn is available, which integrates the subversion functionality into the Internet Explorer. If you have an AFS client on your computer then you can directly address the software repository via the AFS filesystem. Otherwise you have to use the svn+ssh access method via the savannah server. TortoiseSVN has an SSH client configured. This is done through the TortoiseSVN menu in Windows Explorer TortoiseSVN -> Settings on the Network tab under SSH Client. Fortunately, TortoiseSVN comes with TortoisePLink, an implementation of plink , so normally you only have to set the SSH client as: C:\Program Files\TortoiseSVN\TortoisePlink.exe -l username Or if you trust the security on your computer and it's surroundings: C:\Program Files\TortoiseSVN\TortoisePlink.exe -l username -pw password |