wiki:setup_svn_on_allende

Version 3 (modified by Jamie McClelland, 16 years ago) (diff)

--

How do I setup an SVN repository for a member on Allende?

These instructions are for May First/People Link administrators and require special privileges to run.

Big picture: these instructions will result in a single user account on allende that multiple people can use for accessing a subversion repository. Replace the variable $GROUPNAME with the actual group name you are creating.

  • Login to allende and create a new user account - create a long random pasword (it won't be used)
    adduser $GROUPNAME
    
  • Edit the /home/$GROUPNAME/.ssh/authorized_keys file. Add the keys of the people who should have access. Preceding each key should be (replace $USER with the name of the key's owner - this name will be used to attribute changes made by the person owning the public key:
    command="svnserve -t --tunnel-user=$USER -r/srv/svn/$GROUPNAME",no-port-forwarding,no-agent-forwarding,no-X11-forwarding,no-pty
    
    For example:
    command="svnserve -t --tunnel-user=jamie -r/srv/svn/nacla",no-port-forwarding,no-agent-forwarding,no-X11-forwarding,no-pty ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEA3Hk0plzcZ1v69ugNGpp8CwcEqdUz4FxhhbjhfOKqqLYfiUEC3e9j2EDWXkYBZUQecVgF9mxKdzhvUeGoYyJs6jdyOCbtfpo4qFRZrnsiH0GljTpLyM09mhhN8KHiLaQbgEPbQb5Zk7okAgMzR/hINjZzT0+0KC/V4hsHySjxoJ8= jamie@liberace
    
  • Create the group repository:
    svnadmin create /srv/svn/$GROUPNAME
    
  • Ensure proper permissions of the repository:
    chgrp -R $GROUPNAME /srv/svn/$GROUPNAME
    find /srv/svn/$GROUPNAME -perm -u+w -exec chmod g+w '{}' ';'
    
  • Create initial directories (you should put your own public key (temporarily) in the authorized_keys file so you can do this from your local computer:
    svn mkdir svn+ssh://$GROUPNAME@svn.mayfirst.org/{trunk,tags,branches,sandbox}