Can't browse subversion for private projects
Added by Tide _ over 15 years ago
I have set up Redmine, Apache2, Subversion and Mongrel with automatic repository creation. I have created 2 projects. One private and one public. I have added the admin user from Redmine as a member of each project. I am on a VPS with cpanel. I access Redmine via a subdomain of http://redmine.mydomain.com. I access subversion via http://svn.mydomain.com.
I can go to http://svn.mydomain.com/PrivateProject and I am prompted for the user and pass. I enter my admin user and pass and I can see the repository. That seems to be working fine for both public and private projects (no pass needed for private projects). I can also browse the public projects from within Redmine without an issue. The one thing left that I can't do is browse the repository of a private project from within Redmine.
I setup Mongrel like so:
mongrel_rails cluster::configure -e production -p 3000 -N 2 -c /home/myuser/redmine mongrel_rails cluster::start --clean
I run :
ruby /home/myuser/redmine/extra/svn/reposman.rb --redmine mydomain.com:3000 --svn-dir /home/myuser/svn --owner nobody --url http://svn.mydomain.com --verbose
Everything appears to be added correctly. One thing I do notice is that one I finally got it configured somewhat correctly that when I run this command and the repo is added in Redmine that the URL field in Settings is disabled now for the public project's repo. I assume this is normal. So then on my private repo the URL is not disabled. So it makes me think something is not correct on the private repo.
If I check my /home/myuser/redmine/log/mongrel3000.log I see this error:
Password for 'root': Authentication realm: <http://svn.mydomain.com:80> Redmine Username: svn: OPTIONS of 'http://svn.mydomain.com/PrivateProject': authorization failed (http://svn.mydomain.com)
This error occurs every time I click the repository tab inside the private project of Redmine. Then the tab itself displays this error:
The entry or revision was not found in the repository.
Here is are my settings in httpd.conf:
<VirtualHost mydomainip:80> ServerName redmine.mydomain.com ServerAlias www.redmine.mydomain.com DocumentRoot /home/myuser/redmine <Directory "/home/myuser/redmine/public"> Options FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> <Proxy balancer://redmine_cluster> Order allow,deny Allow from all BalancerMember http://127.0.0.1:3000 BalancerMember http://127.0.0.1:3001 </Proxy> RewriteEngine On RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ balancer://redmine_cluster%{REQUEST_URI} [P,QSA,L] <Location /sys> Order allow,deny Allow from 127.0.0.1,mydomain.com </Location> UseCanonicalName Off </VirtualHost> <VirtualHost mydomainip:80> PerlLoadModule Apache::Redmine ServerName svn.mydomain.com ServerAlias www.svn.mydomain.com UseCanonicalName Off <Location /> DAV svn SVNParentPath "/home/myuser/svn" AuthType Basic AuthName "Redmine" Require valid-user PerlAccessHandler Apache::Authn::Redmine::access_handler PerlAuthenHandler Apache::Authn::Redmine::authen_handler RedmineDSN DBI:mysql:database=myuser_redmine;host=localhost RedmineDbUser myuser_redmine RedmineDbPass mypass </Location> <Location /svn-private> DAV svn SVNParentPath "/home/myuser/svn" Order deny,allow Deny from all # only allow reading orders <Limit GET PROPFIND OPTIONS REPORT> Allow from redmine.mydomain.com </Limit> </Location> </VirtualHost>
Any ideas on what is causing this? I have banged hard to get this far and I just have one little hurdle left. I notice that in the mongrel3000.log error that it says "Password for 'root'" and that the Username: is blank. Where does this step get the user and pass info? Why is it asking for the root password and not the Redmine database pass or something?
On that note my svn directory is root:nobody and 0750. The apache user on by box is called nobody.
Hopefully, one of you will shed some light. Thanks in advance for reading this and helping!
Tide
Replies (3)
RE: Can't browse subversion for private projects
-
Added by Tide _ over 15 years ago
I noticed this in the HowTo if it makes a difference:
http://www.redmine.org/wiki/redmine/Automating_repository_creation
The Perl reposman version is deprecated for new installation as it can't register and set the owner.
Guess this is why when I try the respsman command with --owner root or --owner nobody I get the same result.
RE: Can't browse subversion for private projects
-
Added by Tide _ over 15 years ago
I see that this part of my httpd.conf file is not needed for versions after .7 so i removed it but I still have the same results.
<Location /svn-private> DAV svn SVNParentPath "/home/myuser/svn" Order deny,allow Deny from all # only allow reading orders <Limit GET PROPFIND OPTIONS REPORT> Allow from redmine.mydomain.com </Limit> </Location>
RE: Can't browse subversion for private projects
-
Added by Tide _ over 15 years ago
O.K. I have it working. This is what I did. I am not sure exactly which part fixed it for sure.
1. I removed the <Location /svn-private> from my svn.mydomain.com section of my httpd.conf file.
2. Changed Allow from 127.0.0.1,mydomain.com to Allow from mysvndomainip in the </sys> section of the redmine.mydomain.com section of my httpd.conf file.
3. Used this to configure the mongrel part "mongrel_rails cluster::configure -e production -p 3000 -N 2 -c /home/myuser/redmine --owner root --group nobody".
Now it seemed nothing changed but I then did a "svn ls http://svn.mydomain.com/PrivateProject". It asked me for the user and pass. I entered it. Then not sure how or why but when I went back to Redmine I could now see the private project's repository.
I have not had time to add another private project and see if doing "svn ls http://svn.mydomain.com/PrivateProject" and entering the user and pass is necessary every time or if that was what fixed it.