Project

General

Profile

Subversion Authentication Through Redmine

Added by Jamie Talbot over 15 years ago

Hi, I know this has been asked before, but none of the suggestions or steps outlined have solved the problem for me. I've followed the exact steps at the HowTo page, and then made modifications based on other threads in the forum, but nothing seems to help. I have redmine.mydomain.org and svn.mydomain.org on the same box, served through mongrel and apache. Everything is configured, except for 3 issues (probably all related):

Problems

1. I can't see the svn repository of a private project through redmine, instead getting the following error:

The entry or revision was not found in the repository.

2. svn ls svn.mydomain.org/svn/private-project fails with the following:

jamest@localhost:~$ svn ls svn.mydomain.org/svn/private-project
Authentication realm: <http://svn.mydomain.org/svn/private-project:80> Redmine Projects
Password for 'jamest':
Authentication realm: <http://svn.mydomain.org/svn/private-project:80> Redmine Projects
Username:
Password for '':
svn: PROPFIND request failed on '/svn/private-project'
svn: PROPFIND of '/svn/private-project': authorization failed (http://svn.mydomain.org)

jamest is a developer on the private-project project, with every repository permission granted (view, manage, browse, commit).

3. Committing to both public and private projects fails in the same way, with repeated requests for username and password.

Notes

  • Ubuntu Feisty
  • Redmine 0.8.3
  • Repositories have been automatically created by reposman.rb.
  • SVN stuff lives at /data/svn/public-project , /data/svn/private-project
  • All project internal names match the svn repository name exactly.
  • All project internal names use only lowercase a-z, plus dashes.
  • The svn repositories are chowned as root:www-data.
  • Apache runs as www-data.
  • Checking out public repositories is fine.

As someone else noted, when repositories for private projects are created by reposman.rb, the root_url field in the repositories table is not filled in, allowing the URL to be changed in the Repository settings tab. This is different behaviour to public repositories. In attempting to fix this, I copied the url into the root_url directly, which had the effect of locking the input field in the Repository settings tab. However, this did not make any difference.

Redmine Apache Config

(IP addresses modified, but consistent throughout)

<VirtualHost 100.100.100.100:80>
  ServerAdmin jamest@mydomain.org
  DocumentRoot /data/www/rails_apps/redmine-0.8

  <Proxy *>
        Order allow,deny
        Allow from all
  </Proxy>

  ServerName redmine.mydomain.org
  ErrorLog /data/www/rails_apps/redmine-0.8/log/error.log

  ProxyPass /images !
  ProxyPass /stylesheets !
  ProxyPass /javascripts !
  ProxyPass /favicon.ico !
  ProxyPass /static !
  ProxyPass /holding !
  ProxyPass /templates !
  ProxyPass / balancer://redmine_cluster
  ProxyPreserveHost On

  <Proxy balancer://redmine_cluster>
    BalancerMember http://127.0.0.1:9000
    BalancerMember http://127.0.0.1:9001
  </Proxy>

  RewriteEngine On
   # Redirect all non-static requests to cluster
  RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
  RewriteRule ^/(.*)$ balancer://redmine_cluster%{REQUEST_URI} [P,QSA,L]

  <Location /sys>
    Order allow,deny
    Allow from 100.100.100.100
  </Location>
  UseCanonicalName Off

</VirtualHost>

SVN Apache Config

<VirtualHost 100.100.100.100:80>
        ServerName svn.mydomain.org
        ServerAdmin jamest@mydomain.org

        PerlLoadModule Apache::Redmine

        <Directory "/data/www/svn.mydomain.org/html">
                Options FollowSymLinks MultiViews Includes ExecCGI
                AllowOverride All
                Order allow,deny
                Allow from all
        </Directory>

        <Location /svn>
                DAV svn
                SVNParentPath "/data/svn" 

                AuthType Basic
                Authname "Redmine Project Tracking" 
                Require valid-user

                PerlAccessHandler Apache::Authn::Redmine::access_handler
                PerlAuthenHandler Apache::Authn::Redmine::authen_handler

                RedmineDSN "DBI:Pg:dbname=redmine;host=localhost" 
                RedmineDbUser "redmine" 
                RedmineDbPass "password" 

        </Location>
</VirtualHost>

Mongrel Cluster Config

---
user: root
cwd: /data/www/rails_apps/redmine-0.8
log_file: log/mongrel.log
port: "9000" 
environment: production
group: www-data
pid_file: log/mongrel.pid
servers: 2

Any help you can give would be much appreciated - at this point I'm just going around in circles.

Cheers,

Jamie.


Replies (7)

RE: Subversion Authentication Through Redmine - Added by Jamie Talbot over 15 years ago

No ideas anyone? I've had to turn off the integration for now and go back to using standard subversion authentication, which isn't ideal to say the least :(

RE: Subversion Authentication Through Redmine - Added by Arnaud Martel over 15 years ago

I'm not sure it will help you but I had a similar problem when using special chars in the password (for example: èmilé). I changed my password to use only [a-zA-Z0-9] and, now, everything is OK. I suspected a different used encoding between the 2 login methods (Basic authentication vs login form) but I didn't make any deep investigations...

Arnaud.

RE: Subversion Authentication Through Redmine - Added by Alessandro B over 15 years ago

My configuration

<VirtualHost *>
ServerName http://mioweb.eu
DocumentRoot /home/repo
<Location /repo/java>
DAV svn
SVNPath /home/repo/java
SVNListParentPath off
</Location>
PerlLoadModule Apache::Redmine
<Location /repo/java>
DAV svn
SVNParentPath "/home/repo/java"
AuthType Basic
Require valid-user
AuthName "access developer"
PerlAccessHandler Apache::Authn::Redmine::access_handler
PerlAuthenHandler Apache::Authn::Redmine::authen_handler
RedmineDSN "DBI:mysql:database=redmine;host=localhost"
RedmineDbUser "root"
RedmineDbPass "password"
</Location>
</VirtualHost>

Single error is found that does not read the db. If we use this configuration works:

<VirtualHost *>
ServerName http://mioweb.eu
DocumentRoot /www/projet
<Location /repo/projet>
DAV svn
SVNPath /repo/projet
#SVNListParentPath off
AuthName "Repository prova "
AuthType Basic
AuthMYSQLEnable on
AuthMySQLDB database
AuthMySQLUser users
AuthMySQLPassword password
AuthMySQLPwEncryption sha1
AuthMySQLUserTable users
AuthMySQLNameField login
AuthMySQLPasswordField hashed_password
require valid-user
</Location>

Somebody has solved?

Centos 5.3 redmine 8.1

RE: Subversion Authentication Through Redmine - Added by Arnaud Martel over 15 years ago

Alessandro,

I don't understand your configurations. In the first one, you used "root/password" to connect to the database and, in the second one, you used "users/password"... Same thing for the database ("redmine" vs "database").

Check the mysql configuration of your server and verify that socket and tcp connections are working. For example, run the following commands from the console (or a terminal window) with the following commands:
  • mysql --host=localhost --port=3306 --user=root --password=password redmine
  • mysql --host=127.0.0.1 --port=3306 --user=root --password=password redmine

According to the mysql documentation, the first one will use a socket and the second will use a tcp connection.

If TCP connection is OK, then try:
RedmineDSN "DBI:mysql:database=redmine;host=127.0.0.1"

It may work better... If not, please give more explanations (error messages, screen shots, everything that will be usefull...)

RE: Subversion Authentication Through Redmine - Added by Alessandro B over 15 years ago

Please forgive me I have explained. The current and this and I can not make login. I can not access svn in any way.

<VirtualHost *>
ServerName mio web.eu
DocumentRoot /www/repo/luna
PerlLoadModule Apache::Redmine

<Location /www/repo/luna>
DAV svn
SVNPath "/www/repo/luna"
AuthType Basic
AuthName "Area Riservata Developer"
Require valid-users
PerlAccessHandler Apache::Authn::Redmine::access_handler
PerlAuthenHandler Apache::Authn::Redmine::authen_handler
RedmineDSN "DBI:mysql:database=redmine;host=127.0.0.1"
RedmineDbUser "xxxxxxx"
RedmineDbPass "xxxxxxx"
</Location>
</VirtualHost>

Even with this configuration you can not log

RE: Subversion Authentication Through Redmine - Added by Jamie Talbot over 15 years ago

You have "Require valid-users" - should that be "Require valid-user"?

And should it be SVNParentPath instead of SVNPath?

Does anyone have any suggestions for my environment though? (The first one in this thread ;) ) Thanks for the reply Arnaud - my password contains only English letters, numbers and simple punctuation.

    (1-7/7)