This article demonstrates how to configure Subversion (also known as SVN). This involves setting up repositories on the server, and configuring clients to access them.
Subversion, also known as SVN, is a replacement for the Concurrent Versions System (CVS). Like all version control systems, Subversion enables you to track multiple revisions of files and directories. It is installed on all A2 Hosting shared servers.
This article only discusses configuring Subversion on an A2 Hosting account. It does not explain all of the features or how to use Subversion. See the More Information section below for links about how to use Subversion.
To create an SVN repository, all you have to do is log in to your A2 Hosting account using SSH, and then type the following command:
svnadmin create /home/username/repository
Replace username with your A2 Hosting account username, and replace repository with the name of the directory where you want to create the repository (if the directory does not already exist, the svnadmin create command creates it).
To access SVN repositories on an A2 Hosting server from another computer, you must use an SVN client that supports SSH (Secure Shell). HTTP and HTTPS connections are not supported.
SSH supports several authentication methods, including passwords and public-key authentication. Every time an SVN client connects to a repository, it must authenticate using SSH. To avoid the hassle of typing a password over and over, you can:
This article assumes that you will use public-key authentication with SSH and SVN.
You know how to create an SVN repository, but right now you can only check out and import files directly on the server. Clearly, you will want to set up an SVN client so you can work with repositories from another computer.
Configuring an SVN client to work with repositories is a three-step process:
The exact steps to do this depend on the client computer's operating system. Follow the appropriate procedures below for your computer's operating system.
Follow these procedures to set up an SVN client if the computer is running a Microsoft Windows operating system.
To complete steps 1 and 2, follow the step-by-step procedures described in this article. After you complete these procedures, you will have a fully-functioning SSH client installation that authenticates to the A2 Hosting server using keys. You do not have to type a password to access your account on the server.
TortoiseSVN is a popular client for managing SVN projects. The following procedure describes how to set up TortoiseSVN to access repositories on an A2 Hosting server.
To set up the TortoiseSVN client, follow these steps:
Follow these procedures to set up an SVN client if the computer is running Mac OS X or a Linux-based operating system.
To complete steps 1 and 2, follow the step-by-step procedures described in this article. After you complete these procedures, you will have a fully-functioning SSH client installation that authenticates to the A2 Hosting server using keys. You do not have to type a password to access your account on the server.
The svn command line client is often the quickest and easiest way to interact with SVN, although there are GUI-based clients as well. In either case, however, clients use SSH to access SVN. For security reasons, A2 Hosting uses custom port 7822 for SSH connections instead of the default port 22. Therefore, whichever Subversion client you use, you must configure it to use port 7822 for SSH.
The easiest way to do this is to create a custom protocol for Subversion that is only used for A2 Hosting servers. This allows you to still use the regular svn+ssh protocol for other servers that use standard port 22 for SSH.
To create a custom SSH protocol for Subversion, follow these steps:
a2hosting = ssh -p 7822 -q
You can now use the custom protocol svn+a2hosting:// to access a SVN repository over SSH. For example, the following command demonstrates how to check out files from a repository on an A2 Hosting server to your client computer. Replace both instances of username with your A2 Hosting account username, example.com with your domain name, and repository with the path to the repository:
svn co svn+a2hosting://username@example.com/home/username/repository
Subscribe to receive weekly cutting edge tips, strategies, and news you need to grow your web business.
No charge. Unsubscribe anytime.
Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.
We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.