0

my problem is that i am unable to checkout repository, because of the authorization failed message, i used my redmine login/box root login and i can't checkout. i'm able to browse the repository from redmine without receiving any 404 errors.
at the users link of the repository in redmine, no user is displayed, edited many time the repository user and still no progress.

i double checked the following dsn at svn.conf from apache2 sites-available is correct
sql login , user and password are correct

server details ubuntu 12.04 apache 2.2.22

Zoe
  • 27,060
  • 21
  • 118
  • 148
Gntem
  • 6,949
  • 2
  • 35
  • 48
  • Can you give us the exact command you're trying to run? 401 is an authorisation error, so something is wrong with either the request or the credentials you're providing. – Mand Beckett Jun 28 '12 at 13:15
  • i use tortoiseSVN, to checkout repository, the url looks like http://sub.domain.com/svn , it prompts for a username and a password, but can't login with any username or password. the tutorial that i followed is here http://grandslam90.wordpress.com/2012/05/22/howto-redmine-2-0-0-passenger-subversion-repositories-in-ubuntu-12-04/ all work until i setup svn and configure apache2 to user redmine DB/Pass for user authentication to repository. – Gntem Jun 28 '12 at 14:32
  • i'm not sure, but the Redmine DSN/User/Pass that is configured at sites-available/svn.conf has nothing to do with user authentication in svn ? – Gntem Jun 28 '12 at 15:04

1 Answers1

0

The following procedure solved my problem. It allowed the repository to work integrated with Redmine (user mapping) and authenticated for SVN repository. (Assuming you have Subversion's libapache2-svn packages and have restarted apache2 service)

create SVN parent directory

<pre>
mkdir /svn
</pre>

Open /etc/apache2/mods-enabled/dav_svn.conf with an editor

<pre>
&#60;Location /svn>
 DAV svn
 SVNParentPath /svn
 AuthType basic
 AuthName "SVN repositories"
 AuthUserFile /svn/auth
 Require valid-user
&#60;/Location>
</pre>

create htpasswd file and add a user, for adding just remove -c argument

<pre>
htpasswd -cm auth /svn/auth admin
</pre>

setup permissions

<pre>
chown -R www-data:www-data /svn
chmod -R g+ws /svn
</pre>

restart Apache

<pre>
service apache2 restart
</pre>

some changes also are needed in Redmine

<ul>
<li>Setup crontab for managing repositories with redmine</li>
<li>when you browse the repository from redmine and you get a 404 error then go to project settings-> repositories-> your repository [edit] 
<ul>
<li>Username = admin</li>
<li>Password is admin's password</li>
</ul>
</li>
</ul>

you can browse/checkout/commit/etc from h..p://host/svn or via Redmine for browsing and use other tools like TortoiseSVN for checkout/commit/edit/etc..

Montag451
  • 1,168
  • 3
  • 14
  • 30
Gntem
  • 6,949
  • 2
  • 35
  • 48