Apache:无法设置简单的SVN用户和访问权限



我有一个存储在Apache服务器上的SVN存储库。

身份验证是通过SSPI完成的,我正试图将其转移到更基本的东西上(有一个用户/密码的本地列表)。

我的httpd.conf:

LoadModule sspi_auth_module modules/mod_auth_sspi.so
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
#LoadModule auth_digest_module modules/mod_auth_digest.so
#LoadModule authn_alias_module modules/mod_authn_alias.so
#LoadModule authn_anon_module modules/mod_authn_anon.so
#LoadModule authn_dbd_module modules/mod_authn_dbd.so
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authn_file_module modules/mod_authn_file.so
#LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
#LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
#LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_user_module modules/mod_authz_user.so
... 
<Location /svn_toto>
  DAV svn
  SVNParentPath D:web_serversvn_repositories_test
  AuthzSVNAccessFile D:web_serversvn_repositories_testsvnaccessfile.txt
  #Satisfy Any
  Require valid-user
  AuthType Basic
  AuthName "Subversion Repository toto"
  AuthUserFile D:web_serversvn_repositories_testusers.txt
  SVNIndexXSLT "/svnindex.xsl"
</Location>

我的用户.txt

[users]
super = super
jean = jean

我的svnaccessfile.txt

[groups]
admin = super
[/]
@admin = rw
[cloisonnement:/]
jean = rw
super = rw
[cloisonnement:/trunk]
jean = rw
super = rw

现在,在客户端机器上,我尝试:

svn ls https://servername/svn_toto/cloisonnement/trunk --username super --password super

这个失败了,问我密码:

Authentication realm: <https://servername:443> Subversion Repository toto
Username: super
Password for 'super': *****
Authentication realm: <https://servername:443> Subversion Repository toto
Username: super
Password for 'super': *****
svn: E215004: Unable to connect to a repository at URL 'https://servername/svn_toto/cloisonnement/trunk'
svn: E215004: No more credentials or we tried too many times.
Authentication failed

我做错了什么?

您在apache:中混合了svn内置明文身份验证和基本http身份验证

通过说明

  Require valid-user
  AuthType Basic
  AuthUserFile D:web_serversvn_repositories_testusers.txt

您指向Apache http服务器来组织身份验证。要将用户添加到您需要执行的文件中:

htpasswd D:web_serversvn_repositories_testusers.txt super
htpasswd D:web_serversvn_repositories_testusers.txt jean

程序将提示您输入相应的密码,并将其加密存储在users.txt文件中。

最新更新