Project

General

Profile

Cannot browse SVN repository - 404 error

Added by Frank Voorburg over 3 years ago

After installing Redmine inside a Debian 10 VirtualBox VM, I cannot browse SVN repositories. Instead I get a 404 page stating "The entry or revision was not found in the repository". I know, this has been asked before. Unfortunately, the usual solutions don't seem to work. Hopefully someone can assist me with this.

Here's what I'm using:

  • Redmine 4.1.0
  • Ruby 2.5.5
  • Rails 5.2.4.1
  • SVN 1.10.4
  • MySQL/Apache/Passenger

Inspecting "production.log" shows me:

Started GET "/redmine/projects/my-first-project/repository" for 192.168.178.106 at 2021-05-09 12:46:19 +0200
Processing by RepositoriesController#show as HTML
  Parameters: {"id"=>"my-first-project"}
  Current user: myusername (id=5)
Error parsing svn output: No close tag for /lists/list
Line: 4
Position: 117
Last 80 unconsumed characters:

Output was:
 <?xml version="1.0" encoding="UTF-8"?>
<lists>
<list
   path="http://debbie.fritz.box/redmine/svn/my-first-project">

  Rendering common/error.html.erb within layouts/base
  Rendered common/error.html.erb within layouts/base (0.4ms)
Completed 404 Not Found in 72ms (Views: 8.3ms | ActiveRecord: 3.4ms)

From my own PC, I can checkout and commit to the SVN repository.

On the server, I can run the following command and it successfully outputs the entire XML:

sudo -u www-data svn list --xml 'http://debbie.fritz.box/redmine/svn/my-first-project'@HEAD  --username myusername --password mypassword --non-interactive --no-auth-cache

The only thing not working is the repository browsing in Redmine itself.

While debugging and editing "redmine/lib/redmine/scm/adapters/subversion_adapters.rb" I temporarily changed:

str << " --username #{shell_quote(@login)}" unless @login.blank?
str << " --password #{shell_quote(@password)}" unless @login.blank? || @password.blank?

To:

str << " --username myusername" 
str << " --password mypassword" 

Then the repository browsing in Redmine itself does work.

It's also not related to an SSL certificate, because on the VM I don't use one. I also tested on a VPS with proper Let's Encrypt certificate and the problem is the same.

Does anyone have an idea how I can solve this issue? I'm assuming it is not a bug but an incorrect configuration or permission setting somewhere.


Replies (1)

RE: Cannot browse SVN repository - 404 error - Added by Frank Voorburg over 3 years ago

Got it working! In the dav_svn.conf configuration, I changed:

  #read-only access
  <Limit GET PROPFIND OPTIONS REPORT>
    Require valid-user
    Allow from localhost
    # Allow from another-ip
    Satisfy any
  </Limit>

To:

  #read-only access
  <Limit GET PROPFIND OPTIONS REPORT>
    Require valid-user
    Allow from localhost
    Allow from 127.0.0.1
    # Allow from another-ip
    Satisfy any
  </Limit>

So I added the line Allow from 127.0.0.1

    (1-1/1)