Guest's picture

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 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

ken88's picture



Guest's picture

 Solution is

  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


TheShif's picture

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 Siri's picture

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.
TheShif's picture

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.

Jeremy Davis's picture

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.

Sébastien JEFFROY's picture

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 ?


James's picture

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



Adrian VanRassel's picture

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

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.

TheShif's picture

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 Swartz's picture

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.

Adrian VanRassel's picture

Here is the tutorials that I had used.

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 --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.

Adrian VanRassel's picture

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

Pato's picture


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.

GaMa's picture

Err, thanks xD  That got it going

TheShif's picture

We need this solution for the turnkey distro of redmine:

"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) "

Please - any help welcome.

ccwhite's picture

So I followed the instructions on but I still don't get repos auto created when the project is created.

Here is the cron job I used...

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

Enable WS is checked...

www-data is owner of /srv/repos/svn


What am I missing?

Tiago's picture

Hi guys,

For those who are having error 403, you just need to add the key parameter to cron job.

The correct cron job is:

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


The key is in the settings menu (enable WS and click on generate key).
Hope this solves your problem.
Best regards,
TheShif's picture

I was reading to see if this has been fixed in the distribution - or if these extra steps still need to be done afterwards?  I sure hope its been fixed.  :)

Jeremy Davis's picture

I suspect that most of this thread relates to the previous (v2009.x - Ubuntu 8.04 based) TKL release. The current v11.x range is based on Ubuntu 10.04 so is quite different under the hood - although many things remain relevant.

Only Tiago's post (post above yours) is within the v11.x timeframe so that may be relevant.

Try it and let us know how you go.

TheShif's picture

I finaly had time to check the latest release - what a wonderful distribution!

Sadly, the repositories are still not created automatically - the root concern of this thread still exists.  Has anyone a solution? I imagine a cron task would be the simplest way - I think thats how other distributions do it - but I dont know where to begin.

TheShif's picture

I would be happy to provide more information - but i'm not sure what to provide.  The repositories .. dont get created when the project does.  It seems thats the simplest way to state it.  Virtually all other distributions of Redmine have some way around that - I'm loyal to turnkey.  Could somebody help figure this out?

Jeremy Davis's picture

Out of interest I just came across a plugin that may acheive what you're after. Perhaps give that a go and see what you think. Be good to hear back, especially if it works for you..

TheShif's picture

My first attempt with your suggestion didnt go perfectly, but progress WAS made.   Im doing a fresh install now to try again.  

After I installed the plugin, the svn was created using the new plugin (I saw the results in the filesystem), but Redmine didnt see the repo, and never displayed it as being there.

 I think I just didnt put the SVN/GIT folder where turnkey distro expected them to be.  Can anyone tell me where they should be placed for turnkey redmine webui to see them?

TheShif's picture

The plugin works to a point, but the SVN never show up in redmine webui.  This system is perfect - so close to be usable. Ill keep my fingers crossed that someone smarter than me will fix it.

Jeremy Davis's picture

But obviously not. I thought that may have been an easy workaround. Guess you'll have to try the original cron job suggestion as linked to above. The following post seems to have a revised cron entry.

And yes I think it'd be great if TKL could devise a way so this wasn't a problem, or at least was less of a problem.

Ghost's picture

I see that me and many other ppl have problem with the subversion/git auto create. It looks like redmine is a very good SCM but it's to bad that this for me very critical part dosn't work out of the box in this apliance.

What I can see is that the hallo world example dosn't work if you try to connect from outside the webui like tortoiseSVN (svn://...). 

I did use the manual svnadmin create myproject and then connect it to my project and it worked kinda. But then I have the user problem when I try to connect via tortoiseSVN and put in alot of users in a password file instead of useing redmines user database was not an option. 

I did look at the link above that show you have to get it automated with redmine users but I had very hard to follow it becouse they never say where the files are located. Maybe that tutorial with a cron job is the best but it was at least for me to hard to follow. 

Will there be an updated version and if yes, is this something that will be fixed or do we need todo alot of manual steps to get things working?

TheShif's picture

Your comments are completely correct.  There seems to be no path to success with this release - and its a real shame.  Because this release isnt functional, we are foced to use an almost identical distribution that is a sibscription product.  The ONLY thing keeping us from using this version instead - is that it doesnt work. LOL.  We are real turnkey supporters, but nobody from turnkey ever answers this thread - and the situation for this hasnt changed in more than a year.  Most depressing.

Saul's picture

Greetings all,

I've just joined the svn sufferers club :-(

The Redmine appliance itself looks nice, but it does not seem to be integrated with svn!

So I've just set up the svnserve in the very simple way, as explained in The SVN Book.

Edited  /srv/repos/<repo path>/conf/authz and passwd files. Entered svn user names and passwords manually. These can be different from Redmine credentials, but svn clients woud cache the repo URL with credentials anyway, they do not know a thing about the Redmine web interface.

Now I am able to access the demo svn project by URL: svn://<server>/svn/helloworld/trunk

It is obviously not perfect  - but much, much  better than nothing.

A question: the demo helloworld repo is defined with file:// protocol, while users obviously will access it thru svn:// Is this ok?  Should it be set to svn://localhost something?


-- pa

Ghost's picture

I have tryed alot more now and focus on the plugin that was named above. I have came to a point where I'm totaly stuck, in TKL they have redmine installed in /var/www/railsapp and I've get the plugin into  vendor/plugin and copy the scm.yml file to config. Change all the user group and stuff. The plugin use #{RAILS_ROOT} (scm_redmine/lib/scm_config.rb) and I guess this isn't set in TKL so I hard coded it instead and then I get a little longer. 

Then I follow this install and changed the config file to /srv/repos/svn and change user owner.

If you do all this you get the new button that can create a SVN repo. But after you do that the settings tab on that project stop work and you only get a error page that say you should contact your redmine admin, and that's me I guess and I'm totaly stuck here. I can allso connect to my new created SVN repo via tortoiseSVN but I don't know how to define what user to login here so I can't do anything thought. So I don't know if the user thing from redmine work as expected. But at least it's created, WHOHOO :).

This give me some thoughts. Ether it is the plugin that screw everything up, I see Andriy is working on a 0.2.0 version and that it was something in redmine 1.2.x that make his 0.1.1 version not work fully. So it might be that. It can be so simple that if you put in #{RAILS_ROOT} it will work (I have no clue how todo this unfortunly, that's why I hard code it). Or it can be that TKL have set up redmine in some special way so plugin and config get alot more troubling and error prone then it should be. But at the moment I have no clue at all. I guess I will continue to I have this working thought.

I will contact Andriy and see if he have any idé also and will get back here as soon as I have more info in this problem.

Ghost's picture

I have been trying some more and get it all working so I better descibe it here befoure I forget how I did it. 

Hint: I prefer to use filezilla or some other FTP program when you do all the editing in files, one is that the key you generate, if it is a big i or a small L was impossible to see. And it's alot faster to work with too. Although you can edit from the command line (using nano or vim - both already installed in TKL). Or you could use the text editor/file manager built into Webmin. (Personal preference really).

I did the cron job version, I rather see the plugin becouse then you can create the repository directly and don't need to wait for the cron job todo his work. You never know when it will be, ether way you don't get the users from Redmine but I get that to work also.

Let's start with cron job, first you need to Enable WS in Adminstration -> Settings -> Repository then press Generate key to get a key to your WS. Then I created a file (I call mine redmine) and put it in /etc/cron.d/ directory. In this file I put 

10 * * * * root /usr/local/bin/ruby /var/www/railsapp/extra/svn/reposman.rb --redmine localhost --svn-dir /srv/repos/svn --owner www-data --url file:///srv/repos/svn --key=********** >> /var/log/reposman.log  

don't forget to put in your generated key in your file. I don't bother with WS security but if you want todo that you can just check there how you do it. But now you should get a repository auto generated after a while when you create a project.

Now get the users from Redmine database. There might be some error here but I think it should be all in there.

First run

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

and then run

a2enmod dav
a2enmod dav_svn # if you want to use svn
a2enmod perl

to check that all is enabled.

Then you need to link to Apache. Go to

cd /usr/lib/perl5/Apache/ 
ln /var/www/railsapp/extra/svn/ 

or you can copy this file to this directory. Do what you feel is the best.

After this you need to create a file and upload it to /etc/apache2/conf.d/ I have modified this so it works for turnkeylinux. You need to put in your mysql root password that you selected when you created the VM machine, and you need to change to your VM ip. (Copy the text here to your file)

# /svn location for users
PerlLoadModule Apache::Redmine

<Location /svn>
 DAV svn
 SVNParentPath "/srv/repos/svn" 
 Order deny,allow
 Deny from all
 Satisfy any

 PerlAccessHandler Apache::Authn::Redmine::access_handler
 PerlAuthenHandler Apache::Authn::Redmine::authen_handler
 AuthType Basic
 AuthName "Redmine SVN Repository" 

 #read-only access    
Require valid-user
Allow from
Satisfy any

 # write access
   Require valid-user

 ## for mysql
 RedmineDSN "DBI:mysql:database=railsapp_production;host=localhost" 
 ## for postgres
 # RedmineDSN "DBI:Pg:dbname=databasename;host=my.db.server" 
 ## for SQLite3
 # RedmineDSN "DBI:SQLite:dbname=database.db" 

 RedmineDbUser "root" 
 RedmineDbPass "*****" # CHANGE TO YOUR PASSWORD 

When you have done all this you only need to restart your VM and everything should work now. You should connect via http://your.vm.ip/svn/myproject because svn:// don't work with users, only read access from that one, or at least I only get read to work from that one but everything work with http://. 

I think this is very little effort to get this to work in next version of TKL Redmine applience so I hope dev see this and do something about it. I use root user in mysql and it whould be better to use redmine user but I didn't know the password that's why I use root instead (I'm lazy with stuff like this), but it should be easy to fix for them. This work only for svn also and I don't use git so I won't bother to look at it. But you can check out

to get it work, guess you should re-write it so you don't need to use /git and /git-private directory. Instead get the same behavior as svn. I don't think it's that diffecult to get it like that. 

I have change my /srv/repos/svn owner to root:www-data but I don't think this is needed. Buf if everything fails you can test this.

I hope this is so simple so everyone can use it and I think you can create all files in your host OS and then use filezilla or other FTP and upload the files. So you don't need to work in the linux consol at all. The only part you need to access your VM consol is if you want todo a link instead of copy the file. Good luck all out there.

Saul's picture

Thanks this is useful. Exactly what I wanted: connect thru http instead of svnserve.  Will try.

But could you explain why to use ftp to upload files to the VM? Any problem with the webmin upload tool?


-- pa

Ghost's picture

Hey Saul,

You can use what you like to upload and edit the files. It was just something I found out. But as I said in my last post, I'm kinda lazy and use stuff I'm used to. So pick what feels best for you. 

If there are some admin here that can fix my last post I would be very happy.

Jeremy Davis's picture

I just added a little to your 'hint' paragraph. Is that ok?

Ghost's picture

Hi Jeremy,

yea the extended hint was good. What I needed help to change was the code block that get screwed up, where it say (Copy the text here to your file) down and included to </Location> so ppl easier can just copy and past without any problem.


Jeremy Davis's picture

Ghost's picture

Thx alot, great work

conor's picture

When you say "Copy the text here to your file" in conf.d which file are you referring to?

conor's picture

oops, looks like the file can be named anything!

So everything seems to be working but then I ran into a gotcha. LDAP users cannot authenticate to the repos. I tested a local user and was able to authenticate but any users who are setup as LDAP cannot. Authentication into the redmine webapp works as expected with both local and LDAP. Any ideas on how to make this work? We are so close to using this turnkey, but LDAP authentication is a must!

Ghost's picture

I have not tested this so I have no clue what so ever if this work, I have no LDAP but I can throw you in some direction, maybe right, maybe wrong. But pls report what you have done especialy if it works.

Go to

if you scroll down half way down you should see option LDAP configuration, or something simular, what I can read from it you need to install support for LDAP in perl and add a few lines in your apache config. Try that out and see if it works. Good luck

conor's picture


LDAP is now working for both the redmine webUI and subversion.

I followed the instructions from Ghost and then ran:

apt-get install libauthen-simple-ldap-perl libio-socket-ssl-perl

KammutierSpule's picture

I follow the Ghost steps and now the SVN client ask me login and password, what login and password it should expect?

Also any one tell me why should I want LDAP?

I would like that the login and password of SVN be the same as redmine.

Thanks in advance!

KammutierSpule's picture

I found that I should add the users first in the project page

russell's picture

If you have just started the Turnkey Linux SVN vm and can checkout the svn:// project, but are unable to commit changes to this project the following simple update worked for me:

1) edit the /srv/repos/svn/helloworld/conf/passwd file and add a user=password entry

2) edit the /srv/repos/svn/helloworld/conf/svnserve.conf file and uncomment the # password-db = passwd line

You should be good to go...

Add new comment