Configuring Subversion (SVN)
Learn how to set up and use the Subversion (SVN) revision control system on your hosting.com account.

About Subversion
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 hosting.com shared servers.

This article only covers configuring Subversion on a hosting.com account. It does not explain all features or usage. See the More Information section below for links about how to use Subversion.

Creating a repository
To create an SVN repository, log in to your hosting.com account using SSH, and type:

svnadmin create /home/username/repository

Replace username with your hosting.com account username and repository with the name of the directory where you want to create the repository. If the directory does not exist, the svnadmin create command creates it.

Selecting an authentication method
To access SVN repositories from another computer, you must use an SVN client that supports SSH. HTTP and HTTPS connections are not supported.

SSH supports multiple authentication methods, including passwords and public-key authentication. To avoid typing a password repeatedly, you can either:

  • Use an SSH password caching tool, such as ssh-agent on Unix-like systems or Pageant on Windows.

  • Generate a key pair and use public-key authentication (recommended).

This guide assumes public-key authentication.

Configuring an SVN client
Currently, you can only check out and import files directly on the server. To work from another computer, configure an SVN client in three steps:

  1. Generate a key pair for SSH authentication and deploy the public key to the server.

  2. Configure the SSH client to connect using the private key.

  3. Configure the SVN client.

Microsoft Windows
Steps 1 and 2: Generating a key pair and configuring the SSH client
Follow the step-by-step procedures in this article. You will have a fully functional SSH client that authenticates to the server using keys without typing a password.

Note:
These steps use PuTTY, the default SSH handler for TortoiseSVN. When generating a key pair, it is recommended not to specify a passphrase to avoid retyping it each time the client connects.

Step 3: Configuring the SVN client
TortoiseSVN is a popular client for managing SVN projects. To set it up:

  1. Download and install TortoiseSVN from http://tortoisesvn.net/downloads.html.

  2. Start the TortoiseSVN Repository Browser: right-click on the desktop or a folder → TortoiseSVN → Repo-browser.

  3. In the URL text box, type the repository URL:

svn+ssh://profile/home/username/repository

Replace profile with your PuTTY session profile, username with your account username, and repository with the path to your SVN repository.
4. Click OK. The Repository Browser displays the repository files. You can expand folders and browse revisions.

macOS and Linux
Steps 1 and 2: Generating a key pair and configuring the SSH client
Follow the procedures in this article to set up SSH key-based authentication. You won’t need to type a password each time.

Step 3: Configuring the SVN client
The command-line svn client is often the fastest way to interact with SVN.

Some hosting.com servers use a custom SSH port (7822). You can create a custom protocol for Subversion in the ~/.subversion/config file:

[tunnels]
hostingcom = ssh -p 7822 -q

You can now use the custom protocol svn+hostingcom:// to access repositories over SSH. Example to check out files:

svn co svn+hostingcom://username@example.com/home/username/repository

Replace username with your account username, example.com with your domain, and repository with the repository path.

More information

آیا این پاسخ به شما کمک کرد؟ 0 کاربر این را مفید یافتند (0 نظرات)

Powered by WHMCompleteSolution