SVN访问问题

我跟随了用Apache设置SVN的文档 [第3节,但是现在不使用SSL],当我没有在httpd.conf中启用Require user等安全设置时,我可以访问“test”存储库。 在httpd.conf中添加安全设置后,它会提示input用户凭据,尽pipe我提供了正确的用户名和密码(harry / harryssecret),但它不起作用。

在httpd.conf

<Location /svn> Order allow,deny Allow from all DAV svn SVNParentPath /u01/svn/repositories/ # Access control policy AuthzSVNAccessFile /u01/svn/conf/users-access-file Satisfy Any Require valid-user AuthType Basic AuthName "Veera Subversion repository" AuthUserFile /u01/svn/conf/passwd </Location> 

文件path

 [svn@mercury conf]$ pwd /u01/svn/conf [svn@mercury conf]$ ls passwd users-access-file [svn@mercury conf]$ cat passwd veera = test [users] harry = harryssecret sally = sallyssecret [svn@mercury conf]$ cat users-access-file [/] *= harry=w [test:/] harry=w 

来自httpd的error.log

 [Wed Jul 10 22:59:57.889044 2013] [auth_basic:error] [pid 14211:tid 1163790656] [client 192.168.0.39:50612] AH01618: user harry not found: /svn/test [Wed Jul 10 23:01:57.243014 2013] [auth_basic:error] [pid 14239:tid 1165687104] [client 192.168.0.39:50616] AH01618: user veera not found: /svn/test 

AuthUserFile应该是一个使用htpasswd二进制文件创build的Apache密码文件。

您已经向Apache提供了一个Subversion密码文件,并且它不包含任何有效的用户名/密码组合,其格式适用于Apache。