开发者

How can I programatically add a user to subversion from a shell script?

开发者 https://www.devze.com 2023-02-11 20:37 出处:网络
I would like to create a subversion user without restarting the subversion server but the only way to do this seems to be to edit the开发者_StackOverflow中文版 passwd file.

I would like to create a subversion user without restarting the subversion server but the only way to do this seems to be to edit the开发者_StackOverflow中文版 passwd file.

Is there a command to add a user?


There are different ways to authenticate depending on how svn is accessed. If you're serving it through apache htpasswd or htdigest may do what you want.


If you are using the svnserve daemon only, then the user file is the file named in

password-db = passwd.conf

in the conf/svnserve.conf configuration file under the [general] header. There is no API to add users to this file but you can always do:

echo "$user = $passwd" >> conf/passwd.conf

Which will simply append the new user at the end of the list (I assume you have the [users] header already set at the top of that file.

I don't think you should restart the server for the new user to be taken into account.

0

精彩评论

暂无评论...
验证码 换一张
取 消