我有一个Apache的工作设置,Redmine(3.3.2.stable)以及Subversion(1.6.17); 该服务器是Mac OS X 10.6.8 Snow Leopard。 安全问题促使我们将服务器协议更改为HTTPS,因此我们使用我们的证书颁发机构进行了签名。 所有这些都在运行,现在所有的网页都通过HTTPS提供,除了SVN存储库。
试图从原来的HTTTP SVN检查出这样的结果:
svn co http://my.domain/svn/repos . svn: E175011: Unable to connect to a repository at URL 'http://my.domain/svn/repos' svn: E175011: Repository moved temporarily to 'https://my.domain/svn/repos'; please relocate
所以我觉得这很公平,因为从技术上来说确实是搬迁了。 尽pipe使用HTTPS选项尝试相同的命令给了我这个,但:
svn co https://my.domain/svn/repos . Error validating server certificate for 'https://my.domain:443': - The certificate is not issued by a trusted authority. Use the fingerprint to validate the certificate manually! Certificate information: - Hostname: my.domain - Valid: from Apr 26 13:22:21 2017 GMT until Jul 9 23:59:00 2019 GMT - Issuer: CA, DE([email protected]) - Fingerprint: ... (R)eject, accept (t)emporarily or accept (p)ermanently? t Authentication realm: <https://my.domain:443> Redmine SVN Repository Password for 'admin':
这也很好,除了它不接受任何Redmine用户帐户(或本地系统帐户,就此而言)。 为了什么是值得的,我给你的服务器日志的相关部分:
[Tue May 09 14:38:12 2017] [error] "DAV Off" cannot be used to turn off a subtree of a DAV-enabled location. [Tue May 09 14:38:12 2017] [error] [client IP] mod_auth_apple: User admin: authentication failure for "/svn": User not found by checkpw [Tue May 09 14:38:12 2017] [error] [client IP] mod_auth_apple: User admin: authentication failure for "/svn": User not found in htaccess file
希望有人曾经尝试在Mac服务器上做这样的事情。 理想情况下,我想逐步说明如何将SVN服务器设置从HTTP更改为HTTPS; 这至less必须在某处(我到目前为止还没有发现任何东西)。 感谢任何指针。
编辑:我粘贴从httpd.conf下面的相关代码:
#this handles SVN authentication through Redmine DB # /svn location for users PerlLoadModule Apache::Redmine <Location "/svn"> DAV Off SVNParentPath "/usr/local/svn" Order deny,allow Deny from all Satisfy any # If a client tries to svn update which involves updating many files, # the update request might result in an error Server sent unexpected # return value (413 Request Entity Too Large) in response to REPORT # request,because the size of the update request exceeds the limit # allowed by the server. You can avoid this error by disabling the # request size limit by adding the line LimitXMLRequestBody 0 # between the <Location...> and </Location> lines. LimitXMLRequestBody 0 # Only check Authentication for root path, nor again for recursive # folder. # Redmine core does only permit access on repository level, so this # doesn't hurt security. On the other hand it does boost performance # a lot! SVNPathAuthz off PerlAccessHandler Apache::Authn::Redmine::access_handler PerlAuthenHandler Apache::Authn::Redmine::authen_handler AuthType Basic AuthName "Redmine SVN Repository" AuthUserFile /dev/null #read-only access <Limit GET PROPFIND OPTIONS REPORT> Require valid-user Satisfy any </Limit> # write access <LimitExcept GET PROPFIND OPTIONS REPORT> Require valid-user </LimitExcept> ## for mysql RedmineDSN "DBI:mysql:database=redmine;host=localhost" RedmineDbUser 'user' RedmineDbPass 'password'
这现在正在工作。 事实certificate,Apacheconfiguration已经改变,在<Location "/svn">指令中包含了DAV Off行。 这应该真的是DAV svn (见http://www.redmine.org/projects/redmine/wiki/Repositories_access_control_with_apache_mod_dav_svn_and_mod_perl )。 在这个改变之后,检查仓库再次工作(接受服务器证书后)。 从Redmine中浏览存储库仍然不起作用,因为Redmine安装仍指向旧的(http)存储库地址。 这是一个发布MySQL命令的问题,如下所示: http : //www.redmine.org/boards/1/topics/14577 (在我的例子中,我能够使用phpMyAdmin)。
它看起来像你试图访问你的Subversion存储库的用户名“admin”。 这可能是由于你没有提供一个明确的用户ID,因此发出svn命令的用户ID将被采用。 在你上面的例子中,这似乎是“pipe理员”。
接下来,从日志条目判断,服务器要求对用户“admin”进行authentication,但是这个用户既不能通过checkpw也不能在htaccess文件中find。
您必须将admin添加到htaccess文件,或者更可能的是,在您的svn命令中,您必须提供OS X服务器或htaccess文件中存在的用户标识。 例如:
svn co https://[email protected]/svn/repos .