我已按照以下步骤在 Ubuntu 上创建 SVN 存储库:
1-sudo apt-get install subversion apache2 libapache2-svn
2-sudo a2enmod ssl
3-sudo mkdir /etc/apache2/ssl
4-sudo openssl req -new -x509 -days 365 -nodes -out /etc/apache2/ssl/apache.pem -keyout /etc/apache2/ssl/apache.key
5-sudo nano /etc/apache2/ports.conf
并添加了这个
NameVirtualHost *:443
Listen 443
6-sudo nano /etc/apache2/sites-available/default-ssl
注释掉默认证书和密钥:
#SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
#SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
并添加:
SSLCertificateFile /etc/apache2/ssl/apache.pem
SSLCertificateKeyFile /etc/apache2/ssl/apache.key
7-sudo a2ensite default-ssl
8 -sudo /etc/init.d/apache2 restart
9- 为此配置 SVN 服务器,创建一个用于保存 svn 存储库的目录并编辑 dav_svn.conf 文件:
sudo mkdir /svn
sudo nano /etc/apache2/mods-enabled/dav_svn.conf
删除所有数据并使其变得简单如下:
<Location /svn>
DAV svn
SVNParentPath /svn
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/apache2/dav_svn.passwd
Require valid-user
SSLRequireSSL
</Location>
10-sudo htpasswd -cm /etc/apache2/dav_svn.passwd myusername
输入新密码。
11-cd /svn
sudo svnadmin create myrepo
12-sudo chown -R www-data:www-data /svn
13-sudo /etc/init.d/apache2 restart
当我打开 URL 时:https://xxx.xxx.xxx.xxx/svn/myrepo
它要求输入用户名和密码-->登录成功,但是它给了我这个:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<D:error xmlns:D="DAV:" xmlns:m="http://apache.org/dav/xmlns" xmlns:C="svn:">
<C:error/>
<m:human-readable errcode="2">Could not open the requested SVN filesystem</m:human-readable>
</D:error>
知道为什么会出现这个错误吗?
谢谢