Setting up Subversion on Webfaction

These instructions show how to set up a new subversion repository on webfaction and make it web accessible. The first instructions are specific to Webfaction but later sections are more general.

Setting up Subversion on Webfaction

Use the web panel to follow these instructions:

  1. Create a new Application, of type Subversion. Give it a name, e.g. svn (which is used in these example)
  2. Assuming you already have a domain registered (in this example we use example.com), create a new website, say /svn that uses the application you just created. This should make your subversion repository available under www.example.com/svn. If you load this you'll be asked for a username/password. If this happens you've set your subversion app correctly and you should now continue to set up a repository and appropriate access rights

Creating a new Subversion Repository

These instructions show how to create a new repository called vault

  1. Log into your webfaction machine using ssh
  2. create a new repository using svnadmin
    svnadmin create vault

For help using the svnadmin command try svnadmin help

Allowing Web Access to your Repository using ''.htpasswd''

It's possible to restrict access to your new subversion application by using Apache's built-in authentication system. Following these instructions will show how to do this:

  1. Log into your webfaction machine using ssh
  2. cd to the directory containing your subversion installation:
    cd webapps/svn/
  3. There should be a file here called .htpasswd. You can add authentication details here using the htpasswd command. To add a user called lorcan, execute the following command:
    htpasswd .htpasswd lorcan

    This will prompt for the username's password. When you enter this, a new line is added to the .htpasswd file containing the authentication information. If you reload the svn page in your browser (http://www.example.com/svn from the example above) this username/password combination should get you access. You can add new users or change existing user's passwords using this command.

Committing to the new Repository

You should now be able to use your url (http://www.example.com/svn in this example) in a subversion client and access your repository as normal.

public/svnwebfaction.txt · Last modified: 2008/09/11 11:30 by admin
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki