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

 

 

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