SVN access
Added by Stephane Armanet about 16 years ago
Hello
I run Redmine version 0.7.3
I try to configure SVN acces and control with redmine. I follow the documentation and can't get it work.
The automatic creation of the svn repo work fine, but when I try to acces to the svn repo (with a svn client) i get this message:
#svn ls http://localhost/svn-private/pr1/
svn: PROPFIND request failed on '/svn-private/pr1'
svn: PROPFIND of '/svn-private/pr1': 200 OK (http://localhost)
Here is my vhost config for apache:
<VirtualHost *:80>
ServerAdmin admin@test.fr
ServerName redmine.test.fr
DocumentRoot /usr/local/src/redmine/public/<Proxy balancer://mongrel_cluster >
BalancerMember http://127.0.0.1:8000
BalancerMember http://127.0.0.1:8001
BalancerMember http://127.0.0.1:8002
</Proxy>RewriteCond /{REQUEST_FILENAME} -f
RewriteRule (.*) $1 [L]ProxyPass / Balancer://mongrel_cluster/
ProxyPassReverse / balancer://mongrel_cluster/<Proxy *>
Order deny,allow
Allow from all
</Proxy><Location /sys>
Order allow,deny
Allow from all
</Location>PerlRequire /usr/local/src/redmine-0.7.3/extra/svn/Redmine.pm
<Location /svn>
DAV svn
SVNParentPath "/svnroot"
SVNListParentPath OnAuthType Basic
AuthName redmine
Require valid-userPerlAuthenHandler Apache::Authn::Redmine::authen_handler
PerlAccessHandler Apache::Authn::Redmine::access_handlerPerlSetVar dsn DBI:mysql:database=redmine;host=127.0.0.1
PerlSetVar db_user root
PerlSetVar db_pass password</Location>
<Location /svn-private>
Order deny,allow
DAV svn
SVNParentPath "/svnroot"
SVNListParentPath On
Allow from all
#Deny from all
- only allow reading orders
#<Limit GET PROPFIND OPTIONS REPORT>- Allow from 127.0.0.1
#</Limit>
</Location>AddOutputFilter DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0678 no-gzip
BrowserMatch \bMSIE gzip-only-text/htmlErrorLog /var/log/apache2/redmine.error.log
LogLevel debug
CustomLog /var/log/apache2/redmine.access.log combined
ServerSignature Off
</VirtualHost>
Here is the list of my apache Modules:
svntest:/tmp # a2enmod -l
actions alias auth_basic authn_file authz_host authz_groupfile authz_default authz_user authn_dbm autoindex cgi dir env expires include log_config mime negotiation setenvif ssl suexec userdir php5 dav rewrite mod_python proxy mod_proxy proxy_balancer proxy_http dav_svn perl
Here is my production.log
/!\ FAILSAFE /!\ lun sep 22 16:19:36 CEST 2008
Status: 500 Internal Server Error
propfind, accepted HTTP methods are delete, head, get, options, post, and put
/usr/local/src/redmine-0.7.3/vendor/rails/actionpack/lib/action_controller/request.rb:26:in `request_method'
/usr/local/src/redmine-0.7.3/vendor/rails/actionpack/lib/action_controller/request.rb:35:in `method'
/usr/local/src/redmine-0.7.3/vendor/rails/actionpack/lib/action_controller/routing.rb:1483:in `extract_request_environment'
/usr/local/src/redmine-0.7.3/vendor/rails/actionpack/lib/action_controller/routing.rb:1424:in `recognize'
/usr/local/src/redmine-0.7.3/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:170:in `handle_request'
/usr/local/src/redmine-0.7.3/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:115:in `dispatch'
/usr/local/src/redmine-0.7.3/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:126:in `dispatch_cgi'
/usr/local/src/redmine-0.7.3/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:9:in `dispatch'
/usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:76:in `process'
/usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:in `process'
/usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:159:in `process_client'
/usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in `process_client'
/usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `run'
/usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `run'
/usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `run'
/usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:282:in `run'
/usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:281:in `run'
/usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run'
/usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in `run'
/usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
/usr/bin/mongrel_rails:16
Can you help me ????
Replies (3)
RE: SVN access - Added by Nicolas Chuche about 16 years ago
Here is my production.log
> > /! FAILSAFE /! lun sep 22 16:19:36 CEST 2008 > > Status: 500 Internal Server Error > > propfind, accepted HTTP methods are delete, head, get, options, post, and put
svn request are proxypassed to rails where they shouldn't arrive.
No time to test but the problem is in your ProxyPass directives that proxypass EVERYTHING to rails :
ProxyPass / Balancer://mongrel_cluster/ ProxyPassReverse / balancer://mongrel_cluster/
Not really a good idea for the svn part:). Could you try to put them after all the <Location> stuff ?
RE: SVN access - Added by Stephane Armanet about 16 years ago
I've change the rewritecond in my vhost config and it's better:
RewriteCond !^/svn-private/(.*)
RewriteCond %{REQUEST_URI} !^/svn/(.*)
RewriteRule ^/(.*)$ balancer://redmine_cluster{REQUEST_URI} [P,QSA,L]
But now when i try to browse the repository redmine tell :
"The entry or revision was not found in the repository."
in the redmine log:
_
> log/mongrel.8001.log <
svn: Can't check path '/root/.subversion': Permission non accordée
svn: Can't check path '/root/.subversion': Permission non accordée
svn: Can't check path '/root/.subversion': Permission non accordée
Processing RepositoriesController#show (for 127.0.0.1 at 2008-09-24 07:54:01) [GET]
Session ID: 04e3a9641fca26f3aaa6581600e57dcf
Parameters: {"action"=>"show", "id"=>"pr2", "controller"=>"repositories"}
Rendering template within layouts/base
Completed in 0.56256 (1 reqs/sec) | Rendering: 0.07274 (12%) | DB: 0.00000 (0%) | 500 Internal Server Error [http://redmine-test.ill.fr/repositories/show/pr2]
_
when I try to check my repository via the command:
svn ls http://redmine-test/svn/pr1/
It's OK but no login/password are asked !!!??
Strange ??
RE: SVN access - Added by Stephane Armanet about 16 years ago
Finally It's work well .
I've modify the lib/redmine/scm/adapters/subversion_adapter.rb like this:
SVN_BIN = "svn --config-dir /var/lib/wwwrun"
And modify my rewriteCond like this
RewriteCond %{REQUEST_URI} !^/svn(.*)
RewriteCond %{REQUEST_URI} !^/err(.*)