Redmine and SVN

When creating a project in Redmine, is a SVN repository automatically created if I choose Subversion for my repository? If not, is there a script that I can run (I read about one for the trac appliance)? Or do I have to create it on my own repositories and set up users and permissions for the login user and pw on the repository setup screen for each project?

 

Guest's picture

sorted my problem   for some

sorted my problem

 

for some reason when using the web interface to create the projects it does not automatically create the /srv/repos/svn/<name> dirs (maybe im missing something)

by using

svnadmin create /srv/repos/svn/<name>

automatically created my structure and got the project page working. for authentication (commits etc), i had to manually edit the /srv/repos/svn/<name>/conf/svnserve.conf and then the ./passwd file for the auth

hope that helps

Guest's picture

solution

 Solution is http://www.redmine.org/wiki/1/HowTo_Automate_repository_creation

  1. Go to « Administration -> Settings -> Repository » and check Enable WS for repository management.
  2. change own of SVN repository: chown root:www-data /srv/repos/svn
  3. Add line to crontab (# crontab -e)

 

*/2 * * * * ruby /var/www/railsapp/extra/svn/reposman.rb --redmine localhost --svn-dir /srv/repos/svn --owner www-data --url file:///srv/repos/svn/ >> /var/log/reposman.log

Create project and after minute script create repository

 

tonys's picture

Perfect Fix

Thank you nameless guest!  Your three step fix was just the thing I needed!  This really should be included in out-of-the-box behavior. 

I think something is still missing for me though - The repo does now get created - but i cant seem to access it with my svn client.  When I attempt acces via http: I get a method ot supported response, when I use svn:, it fails saying that authenitcation failed.  (No attemp to athenticate is successfull, or is prompted for.) Not sure what Ill try next...

liraz's picture

Fixing this in future versions

Thanks for the feedback guys. This is very helpful. I think we'll look into improving the out-of-the-box behavior in the next version of the Redmine appliance.
tonys's picture

More needed to make SVN usable

It seems that there may be more needed to make the SVN usable by clients.  I was following this but got stuck.  The first long command doesnt work - saying that aptitude is an unknown command.  Of the next thee things to do, only the first one works.  Without these, Im pretty sure the rest of the proceedure is doomed to fail.  At this junture - I seem well and truly stuck.

JedMeister's picture

For starters, aptitude is not install by default

So if you wish to use aptitude (an alternative installer - similar to apt-get but with some nice features) then install it first:

apt-get install aptitude

Alternatively you could just use apt-get instead (replace aptitude with apt-get, also sudo is not required unless you aren't running as root. So the first line would look like this:

apt-get install libapache2-svn libapache-dbi-perl libapache2-mod-perl2 libdbd-mysql-perl libdigest-sha1-perl

See how you go now.


Guest's picture

svn: Authorization failed

When I try to commit into a svn repos, I have an authorization failed error.

$ svn mkdir svn://XXX.XXX.XXX.XXX/svn/helloworld/test -m "test" --username=sebastienj
svn: Authorization failed

I already added an admin user to the svn project throught redmine but there is still the problem.

I can't also find the svn apache configuration. It's not in /etc/apache2 folder.

Anybody has an idea ?

Thanks.

Guest's picture

Had a similar problem and i

Had a similar problem and i think i had the anser for you

access is not set when the cron job Guest came up with creates the repository, you have to go in and add access in the svnserve.conf file

this file can be found one dir down in your repo under the dir of conf dir

eg /srv/repos/svn/myrepo/conf/svnserve.conf

check out this man file for setting that up

http://linuxmanpages.com/man5/svnserve.conf.5.php

 

 

gamatecal's picture

Reviving, a needed feature for Redmine

I personally don't want to manually enter in every User/Pass for svn access.  Namely because the password is plain text (and would be a lot cooler and more efficient if access can be controlled through redmine).

I have tried http://www.redmine.org/wiki/redmine/Repositories_access_control_with_apa...

but the svn apache config file isn't there.  I tried making a new conf file to see if it would work, but does not.  Would be great if someone can point me in the right direction.


tonys's picture

Only Missing Feature - But its important

We currently have to use a subscription (read: expensive) version of redmine because of this missing feature.  Please consider revising this - and including the automation/connection to the SVN.  We too have tried instructions to do it ourselves - to no avail.

alon's picture

More information required

Could you be a little more specific of the feature request. A description of the problem, and a link to solution would be great, as well as any issues you came across when attempting the integration.

gamatecal's picture

The information

Here is the tutorials that I had used.  http://www.redmine.org/wiki/redmine/HowTo_configure_Redmine_for_advanced...

Both steps 1 and 2 ('How to Automate repository creation' & 'Repositories access control with apache, mod_dav_svn and mod_perl')

For the first part, it explains how to automate repo creation.  Everything worked fine until the testing occured.

ruby reposman.rb --redmine my.redmine.host --svn-dir /var/svn --owner www-data --url http://my.svn.server/svn-private/ --verbose

I first tried with an unprivileged user, gave the desired results, then tried with a privileged user, showed authentication failure.  Other then that, the rest of that tutorial was self explanatory and had no troubles with.  No user can create repositories, which isn't a big deal.

 

The second tutorial, which was a must to have, was a pain.  I got up to the part with testing it.  Always received a 500 internal server error.  I had a friend do it for me, now it works.  But it was a serious pain, but it is set up weirdly.  You require a username and password regardless, which breaks anonymous access, but the redmine settings depict that anonymous access is set to allow read.


gamatecal's picture

Where is svn:// directive?

Subject says it all.  How do I change where svn://domain.com/svn points to?  The tutorial I used above this comment, works for http://domain.com/svn.


lankaster.lopez's picture

more info

Hello

I have my redmine working with svn (if i create a proyect the svn repo is created and the users are able lo login with the same credentials they use to login to redmine) 

If you tell me more details i can help you. Also the file you mention is dav_svn.conf? which distro are you using? I have it configured on debian, and that file is located in /etc/apache2/mods-enabled

Thats the file you should look and edit and of course, add it to the loaded modules of apache.


Guest's picture

Err, thanks xD  That got it

Err, thanks xD  That got it going

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options