svn: Could not open the requested SVN filesystem

2019-04-16 16:30发布

问题:

I tried to set up svn in the LAMPP environment. My svn repositories are in /var/svn/repos, and the repos directory is owned by root:root.

Now, when running the command

svn import test http://localhost/svn -m 'init'

I see this error message:

svn: Could not open the requested SVN filesystem

How can I make the command run successfully?

回答1:

You need the repository to be accessible by the web server (Apache). Change the user:group to something like apache:apache, httpd:httpd, or www-data:www-data.



回答2:

I had same problem with my subversion (1.6) on default repository of cent OS. Finally i un-installed svn and install latest version(1.8). My problem solved.

To install svn latest version follow this link. http://tecadmin.net/install-subversion-1-8-on-centos-rhel/



回答3:

please run this command under your repo after running "chown -R apache:apache *". You have to change file and directory permission as well

 find . -type f -exec chmod 644 {} \;
 find . -type d -exec chmod 755 {} \;


回答4:

Go to SVNParentPath Directory Here my directory path is /var/www/svn

cd /var/www/svn/

Create a Repository Under SVNParentPath

svnadmin create repo_name

Give Apache Permission

chown -R apache:apache repo_name/

Create a SVN User

htpasswd -m /etc/httpd/conf/.htpasswd username

Assign Permission

vi /etc/svnusers
[repo_name:/]

username=rw

Restart Apache Service

service httpd restart


回答5:

You might have run into the SVN issue with custom error documents. Fix it:

If you've got a custom 404 ErrorDocument that's enabled under the repository location, you might be faced with '500 Cannot load the requested SVN filesystem' – solve this by resetting the ErrorDocument directive in the Location block; a working configuration is below:

<VirtualHost *:80>
  ServerName localhost
  DocumentRoot /var/www
  <Location /svn>
    DAV svn
    SVNPath /var/svn/repos
    ErrorDocument 404 default
  </Location>
</VirtualHost>

This is from RimuHosting's subversion HowTo. The important line is ErrorDocument 404 default – add this to the <Location …> block that configures a location for SVN, reload the Apache config, and it should be fine.

(I guessed your SVN repo is probably mapped to http://localhost/svn/ and adapted config directives in the quotation accordingly.)



标签: svn centos lampp