2012-03-02

SVN creating a new repository

Since I am now running my own SVN server there is only a slight cost in time to creating a new repository.  The top level directory in an SVN server is the repository and has to be created on the server rather than creating lower level directories which can be done by Tortoise SVN.  Getting round running at the adminstrator level is handy about svnSync and also about the SVN hosting services such as Codesion  and SlikSVN.

So on synology SVN host I logged in as root, there may be better ways of doing this but this worked for me.  Created my new site:

svnadmin create /volume1/svn/new_repository

This now inherits the wrong file permissions (root) so the directory listing looks like this:

image

so I moved to the directory and changed the owner and group:

cd /volume1/svn/new_repository
chown –R svnowner:users .

(don’t forget the trailing dot) and now it looks like this:

image

Next you need to add your username and password to the configuration file new_repository/conf/passwd (I am using vi for the editor) eg

image

Then in the same directory you need to change the following entries for the configuration file (svnserve.conf)

Make anonymous access have no access and authorised access write access:

image

Turn on using the local password database:

image

I also changed the realm to my URL but that is optional.

Now you can import your new directory using the method I talked about a while back.

No comments: