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
-
Create the Repository:
sudo svnadmin create /var/svn
This command initializes a new Subversion repository in
/var/svn
. -
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. -
Set User Umask: To maintain group write permissions, add
umask 002
to each user's login profile (e.g.,.bashrc
or.profile
). -
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. -
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.