jeudi 24 juillet 2014

Configure SVN Ubuntu

1: Create a repo:

    $ svnadmin create /media/datadrive/svn/test

2: Set the password:

    $ sudo gedit /media/datadrive/svn/passwd-team

    And then, add the user information into the file, as follows:

[users] 
michal = somepassword 
jimmy = anotherpassword 
craig = yetanotherpassword

Since the password is not encrypted, so use the following command so that only the root can read.

    $ sudo chmod 600 /media/datadrive/svn/passwd-team

3: configure:
Each SVN repo has a scnserve.conf file, which is created automatically when you execute step 1. Using the following command to edit this file for configuration.

    $ gedit /media/datadrive/svn/test/conf/svnserve.conf

Find the following lines, and specify the password:

[general] 
anon-access = none 
password-db = /media/datadrive/svn/passwd-team 
realm = Team

4: Start the svn:
foreground

    $ sudo svnserve -d --foreground -r /media/datadrive/svn/

or background:

    $ sudo svnserve -d -r /media/datadrive/svn/

5: Start svn client using another machine:

    svn checkout svn://192.168.10.01(put the IP addr. here)/test --username jimmy


Aucun commentaire:

Enregistrer un commentaire