svn设置帐号信息

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

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

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

目录结构

folder-structrue

设置用户名和密码的步骤

1、关闭匿名帐号权限,设置为none即可。(不要设置#号,否则版本号码就不能看到)

SVN/conf/svnserve.conf

[code lang="c"]
anon-access = none
[/code]

2、设置对passwd和authz的支持

SVN/conf/svnserve.conf

[code lang="c"]
password-db = passwd
authz-db = authz
[/code]

3、在passwd里边设置用户名和密码

SVN/conf/passwd

[code lang="c"]
### 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
[/code]

4、在authz里边给帐号设置权限
SVN/conf/authz

[code lang="c"]
[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
[/code]

5、通过组给别人权限
SVN/conf/authz

[code lang="c"]
[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
[/code]

6、给子级目录添加权限

[code lang="c"]
[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
[/code]

7、other

image049 image050 image051

» 转载请注明来源:若我若鱼 » svn设置帐号信息

Leave a Reply

Your email address will not be published. Required fields are marked *

seven + 10 =