2009-06-24

创建 svn repository 的命令

弄了好几次,每次都得现查一遍。所以整理一下列于此:

摘自于http://www.howtoforge.com/debian_subversion_websvn

// root
# mkdir /var/svn-repos/
# svnadmin create --fs-type fsfs /var/svn-repos/project_name

# groupadd subversion
# addgroup svnuser subversion
# addgroup someuser subversion

# chown -R svnuser:subversion /var/svn-repos/*
# chmod -R 770 /var/svn-repos/*

// normal user (should be in group subversion)
$ mkdir ~/.ssh/
$ cd ~/.ssh/
$ ssh-keygen -t dsa
$ cat ~/.ssh/id_dsa.pub | ssh you@ "cat - >> ~/.ssh/authorized_keys"

$ svn import -m "importing test over ssh+svn" svn+ssh:///var/svn-repos/project_name/trunk
$ svn co svn+ssh:///var/svn-repos/project_name/trunk
发表评论