搭建在CentOS下的svn 配置文件不正确导致的不能正常使用的错误
svn的配置文件有的地方需要空格,有的地方不需要空格,配置文件一个不正确,就可能导致svn不能正常使用,通过配置文件这种严格的空格要求看来,svn的设计者应该是写shell程序比较多的。
此几行配置所在行第一个字母前不能有任何空格,配置项等号左右两边各一个空格。配置项后面也不要紧跟着#之类的注释字符
下面是修改好的一个配置文件片段样板
文件:/home/svn/repos/conf/svnserve.conf
----------------------svnserve.conf 修改后 begin --------------------------
### Visit http://subversion.apache.org/ for more information.
[general]
anon-access = read
auth-access = write
password-db = passwd
authz-db = authz
realm = repos
----------------------svnserve.conf 修改后 end ------------------
svnserve.conf 修改前
文字“#用户密码文件”和这行文字前面仅邻它的一个空格是多余的
文字“#授权登录文件”和这行文字前面仅邻它的一个空格是多余的
----------------------svnserve.conf 修改前 begin --------------------------
### Visit http://subversion.apache.org/ for more information.
[general]
anon-access = read
auth-access = write
password-db = passwd #用户密码文件
authz-db = authz #授权登录文件
realm = repos
----------------------svnserve.conf 修改前 end ------------------
配置文件配置不正确时 svn list 命令的错误提示
[root@server-100 ~]# svn list svn://10.168.1.103:9999/repos
svn: E170013: Unable to connect to a repository at URL 'svn://10.168.1.103:9999/repos'
svn: E215004: Authentication failed
配置文件配置正确时svn list 命令执行正常的提示信息:
[root@server-100 ~]# svn list svn://10.168.1.103:9999/repos
Authentication realm: <svn://10.168.1.103:9999> repos
Password for 'svn_admin': *********
-----------------------------------------------------------------------
ATTENTION! Your password for authentication realm:
<svn://10.168.1.103:9999> repos
can only be stored to disk unencrypted! You are advised to configure
your system so that Subversion can store passwords encrypted, if
possible. See the documentation for details.
You can avoid future appearances of this warning by setting the value
of the 'store-plaintext-passwords' option to either 'yes' or 'no' in
'/root/.subversion/servers'.
-----------------------------------------------------------------------
Store password unencrypted (yes/no)? yes
[root@server-100 ~]#