Quick and Efficient Subversion Repository Setup with SSH

Posted on in software

Setting up a Subversion (SVN) repository can be streamlined by using SSH, especially when developers already have system accounts. This method bypasses the complexity of setting up WebDAV with Apache.

Steps to Set Up Subversion with SSH

  1. Create the Repository:

    sudo svnadmin create /var/svn
    

    This command initializes a new Subversion repository in /var/svn.

  2. Set Permissions: Ensure the developer group has access:

    sudo chgrp -R dev /var/svn
    sudo chmod -R g+w /var/svn
    

    Adjust dev to your developer group name.

  3. Set User Umask: To maintain group write permissions, add umask 002 to each user's login profile (e.g., .bashrc or .profile).

  4. Import Data: Import existing data into the repository:

    svn import ./Projects file:///var/svn/ -m "Initial import"
    

    This imports the Projects directory into the SVN repository.

  5. Checkout Repository: Developers can check out their working copies using:

    svn checkout svn+ssh://server_name/var/svn/Projects Projects
    

    Replace server_name with your server's hostname or IP address.

Conclusion

Using SSH for Subversion repositories simplifies the setup and leverages existing user accounts. This approach provides a quick, secure, and efficient way to manage your repositories without the overhead of configuring WebDAV.

For more information and troubleshooting tips, visit the original guide.

Slaptijack's Koding Kraken