Showing posts with label svn. Show all posts
Showing posts with label svn. Show all posts

Tuesday, August 30, 2011

How To setup svn server on ubuntu

Create new SVN repo

svnadmin create wgrass

Import files to SVN repo

svn import /home/rashad/code/wgrass/ file:///home/rashad/svn/wgrass


Create User - newuser for svn repo

sudo htpasswd -cm /etc/apache2/pass.passwd newuser
Enter Password:
Re-Enter Password:

Add user to svn Repo

nano wgrass/conf/passwd

### This file is an example password file for svnserve.
### Its format is similar to that of svnserve.conf. As shown in the
### example below it contains one section labelled [users].
### The name and password for each user follow, one account per line.

[users]
newuser = pass


nano wgrass/conf/svnserve.conf

[general]
### These options control access to the repository for unauthenticated
### and authenticated users.  Valid values are "write", "read",
### and "none".  The sample settings below are the defaults.
anon-access = none
auth-access = write
### The password-db option controls the location of the password
### database file.  Unless you specify a path starting with a /,
### the file's location is relative to the directory containing
### this configuration file.
### If SASL is enabled (see below), this file will NOT be used.
### Uncomment the line below to use the default password file.
password-db = passwd

Setting up dav access
Allow Anonymous checkout


  DAV svn
  SVNPath /home/rashad/svn/wgrass
  AuthType Basic
  AuthName "wgrass"
  AuthUserFile /etc/apache2/pass.passwd
    Order deny,allow
    
      Require valid-user
    

Disable Anonymous checkout


  DAV svn
  SVNPath /home/rashad/svn/wgrass
  AuthType Basic
  AuthName "wgrass"
  AuthUserFile /etc/apache2/dav_svn.passwd
  Require valid-user

now you can access svn on yourhos.com/svn/wgrass

Happy Hacking :)