Tips: 本文创建于2014年8月9日,已超过 2 年,内容或图片可能已经失效!

svn设置帐号信息

修改配置文件,设置匿名账号权利d:/svnServer/app/shop/conf/svnserve.conf

anon-access = write

使用svn过程中可以给每个用户设置用户名和密码,大家通过自己的账号登录svn。

目录结构

folder-structrue

设置用户名和密码的步骤

  1. 关闭匿名帐号权限,设置为none即可。(不要设置#号,否则版本号码就不能看到)SVN/conf/svnserve.conf
anon-access = none
  1. 设置对passwd和authz的支持SVN/conf/svnserve.conf
password-db = passwd
authz-db = authz
  1. 在passwd里边设置用户名和密码SVN/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]
# harry = harryssecret
# sally = sallyssecret
username = passwd
  1. 在authz里边给帐号设置权限SVN/conf/authz
[groups]
# harry_and_sally = harry,sally
# harry_sally_and_joe = harry,sally,&joe

# [/foo/bar]
# harry = rw
# &joe = r
# * =

# [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r

[SVN:/]
username = rw
  1. 通过组给别人权限SVN/conf/authz
[groups]
# harry_and_sally = harry,sally
# harry_sally_and_joe = harry,sally,&joe
rw = username,username1,username2

# [/foo/bar]
# harry = rw
# &joe = r
# * =

# [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r

[SVN:/]
@rw = rw
  1. 给子级目录添加权限
[groups]
# harry_and_sally = harry,sally
# harry_sally_and_joe = harry,sally,&joe

# [/foo/bar]
# harry = rw
# &joe = r
# * =

# [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r

[SVN:/sub] #SVN下的sub目录,协议:svn://localhost/SVN/sub
team1 = rw
team2 = rw
team3 = rw
  1. other

image049
image050
image051