For AI agents: the complete documentation index is available at https://docs.ovhcloud.com/en/llms.txt, the full documentation bundle is available at https://docs.ovhcloud.com/en/llms-full.txt, and this page is available as Markdown at https://docs.ovhcloud.com/en/guides/web-cloud/web-hosting/svn.md.

Using SVN

View as Markdown

Find out how to use SVN via SSH on your Web Hosting plan

Objective

SVN, which stands for "subversion," is a version management system.

This guide explains how to use SVN over an SSH connection on your Web Hosting plan.

Information regarding OVHcloud service administration and how to find appropriate assistance

When using OVHcloud guides, please be aware of the following conditions:

  • User instructions aim to provide as many details as possible but cannot cover individual use cases. You might need to adapt the pertinent actions to your requirements.
  • The OVHcloud ecosystem is built for flexibility and freedom of choice. Customers are therefore responsible for the secure and proper configuration of their services. To prevent data loss, we strongly recommend to apply backup strategies to all your important data.
  • Our guides and tutorials may reference third-party software or services in combination with OVHcloud solutions. The technical support provided by OVHcloud does not include the configuration of systems or products outside of our responsibility. This includes but is not limited to:
    • Operating systems and user interfaces (Windows, Debian, Plesk, etc.).
    • Any other third-party software (FTP clients, email software, etc.).
    • Services offered by other providers (DNS, APIs, user interfaces, etc.).

To receive the appropriate assistance for any issues you might experience, follow these guidelines:

  • You seek personalized advice or you would like to discuss a topic that is not covered in detail by our documentation?
    Join the OVHcloud Community to search for your topic and reach out to other users.
  • You need to report an incident regarding your OVHcloud service or you are experiencing difficulties in the OVHcloud Control Panel?
    Create a support request in our Help Centre.
  • You require professional assistance for your project or you need help with tasks outside our support scope?
    Visit our partner portal to search for experts who are familiar with OVHcloud solutions.
  • You are looking for more detailed information regarding our support levels and Professional Services?
    Please visit our web pages for OVHcloud support levels and OVHcloud Professional Services.

You can participate in improving our documentation:

  • You would like to share feedback to improve a guide page or you want to report insufficient information on a specific page?
    Use the "Was this page helpful?" buttons at the bottom of the page to let us know.
  • You would like to propose a specific documentation update?
    Use the "Edit this page" function, available at the bottom of the page and in the sidebar.

Requirements

Instructions

Creating the repository

Once you have logged in via SSH on your hosting, first create the root directory of your SVN repositories, then the repository.

To do this, simply type these commands:

mkdir svn
svnadmin create svn/depot_test

You can then check that the directories have been created with the following command:

ls -la

You should see the directories as shown in the following image:

hosting

Creating public/private keys

Before you continue, it is necessary to create a pair of SSH keys from the desktop you will use to connect to the SVN repository.

In order to create a key pair, please follow our guide on Creating SSH keys.

Adding the public key to the Web Hosting plan

Once you have obtained your key, add it in the ".ssh/authorised_keys2" file by typing the commands below:

mkdir .ssh
chmod 700 .ssh
vi .ssh/authorized_keys2

The new file opens for editing. Insert the following line, followed by the previously created key. Make sure that the whole string is on the same line.

command="/usr/bin/svnserve --root=/homez.XXX/loginFTP/svn --tunnel --tunnel-user=john",no-port-forwarding,no-agent-forwarding,no-X11-forwarding,no-pty
Info

Replace "/home.XXX/loginFTP" and "john" with your SSH credentials. To find out the correct numbers to use inside "/home.XXX/loginFTP", type the command "pwd" at the command line.

You can also find this information in our guide on Accessing a Web Hosting plan via SSH.

hosting

You can retrieve the contents of the repository without directly logging in via SSH on the hosting.

Warning

The same key must not be used for SVN and the SSH connection.

Examples

On Linux

You can run a test from the computer connecting to the SVN repository by typing the following line:

svn checkout svn+ssh://loginFTP@clusterXXX/depot_test

On Windows with TortoiseSVN

  • Download and install TortoiseSVN.
  • Right-click the private key. An icon appears in the bottom right-hand corner, and the key is loaded into the authentication agent.
  • Create a directory, right-click on it and select "SVN Checkout".
  • Enter svn+ssh://loginFTP@xxplan.ovh.net/depot_test in the “URL of repository” field and click OK.
hosting

Please also read the documentation for Subversion: https://svnbook.red-bean.com/en/1.5/index.html

Specific cases

Creating multiple accounts

First, you need to create SSH key pairs for each user. Then add the public key to the hosting as explained above:

command="/usr/bin/svnserve --root=/home.XXX/loginFTP/svn --tunnel --tunnel-user=username",no-port-forwarding,no-agent-forwarding,no-X11-forwarding,no-pty

Replace "username" with your respective identifiers and repeat the command to add multiple users.

Note that it is also possible to grant a read-only access by adding this parameter:

--read-only.

Checking locally on the server

If you want to perform a local check, the examples provided will not work. You will need to use the command like this:

svn+ssh://login@ftp.name-of-site.tld/home.XXX/login/svn/depot_test

Go further

Accessing a Web Hosting plan via SSH

For specialised services (SEO, development, etc.), contact OVHcloud partners.

Join our community of users.

Was this page helpful?