This forum is no longer active. Please post your questions to our new community site

Forums Redmine

[TUT]Getting SVN working with Redmine

Subscribe to [TUT]Getting SVN working with Redmine 10 post(s), 4 voice(s)

 
Avatar acidicxdreams 7 post(s)

If you have successfully installed Redmine, and were unable to get SVN working with it – this is the tutorial for you! The simple solution: install VisualSVN Server – http://www.visualsvn.com/server/

After installing, launch the control panel. Create a user by clicking “Create User”, I named mine “root”(without the quotes). Set the password to something you will remember (you will need it later on).

After that, create a repository by clicking the “Create Repository” link. I named mine Test Project.

After you have created a user and repository, go to http://your-pc-name/repository_name; you will be prompted for your username and password (this is the user you created earlier; just enter the username and password that you choose). You can now see your repositorys contents.

Now that you can see your repository, simply login to Redmine, then go to: Project > Settings > Repository;
Type: Subversion
URL: http://your-pc-name/repository_name/
Username: your VisualSVN Server’s username (the one that you created)
Password: your VisualSVN Server’s password (the one that you created)

Save, and visit your “Repository” tab – and it should be working! :)

NOTE: If your repository doesn’t load, look in your VisualSVN Server control panel for the settings, and make sure that “Use HTTPS” is disabled – or change your projects repository settings to https://your-pc-name/repository_name
NOTE 1: “your-pc-name” is the name that is shown in your VisualSVN Server control panel.

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Thanks for posting it! I’m sure it will be helpful for other users

 
Avatar acidicxdreams 7 post(s)

No problem! I hope it is :)

 
Avatar jwells 16 post(s)

Any assistance for those of us not running Windows?

I haven’t the slightest clue of where to create the repository on my new Redmine VA. I’m familiar with command-line Linux, and I’m aware that I need to run “svnadmin create /path/to/repository” Forgive the stupid joke, but that path doesn’t exist on my system. :) Truthfully, where would be an acceptable/reasonable/expected place to create a first repository on a new Redmine install?

I tried running:

svnadmin create /opt/bitnami/repos

Sure enough, there’s a “repos” directory there now, right where I’d expect it, but when trying to access it from a client using:

svn list —verbose svn://redmine/repos

…the response is:

svn: No repository found in ‘svn://redmine/repos’

For the record, “redmine” is a valid hostname that I can ping and do a reverse lookup on. I always name VAs for the app I’m running on them when I’m testing.

Based on all of that I have to believe that I should create the repository somewhere else… but where? /opt/bitnami/apache2/htdocs?

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi,

Please check that the subversion server is running (./ctlscript.sh status) and specify the full path to the repository (for instance http://hostname/opt/bitnami/repository). You can find more info in the 9.4 section at http://bitnami.org/files/stacks/redmine/1.0.0-0…

 
Avatar jwells 16 post(s)

@beltran

So the answer is:

svn://host-name/full/path/to/repository

And you get to put the repository anywhere you like. Now I just need to monkey with users. I seem to remember seeing some discussion around the interwebs about how to configure svn to use Redmine for authentication. Any idea if this still works if Redmine is using LDAP from another server? That would be killer!!

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Yep,

Redmine supports LDAP authentication but you have to configure it. Yes, you have to specify the full path to the repository. Another option is to specify the repository location in the /opt/bitnami/subversion/scripts/ctl.sh script and restart the Subversion server so it is not necessary to specify the full path location.

 
Avatar jwells 16 post(s)

SVN LDAP Authentication: I’ve got Redmine configured to connect to our LDAP server for authentication. That works like a charm. What I’m curious about (and I really should do more digging on my own) is telling SVN to look to Redmine for authentication details. e.g. SVN auth request → Redmine auth request → LDAP auth request instead of SVN auth request → LDAP auth request

Repository locations: I’ve looked through /opt/bitnami/subversion/scripts/ctl.sh I don’t see where the repository location should go. Should it be added as an argument to $SVN_START? Perhaps with -r?

from: /opt/bitnami/subversion/bin/svnserve -d —listen-port=3690 —pid-file=$SVN_PIDFILE
to: /opt/bitnami/subversion/bin/svnserve -d —listen-port=3690 —pid-file=$SVN_PIDFILE -r /path/to/repos

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Sorry,

Yes you are completly right, it is necessary to add the “-r” option in this line.

 
Avatar vngeek 2 post(s)

I had a problem too to get SVN working on the Subversion stack. However it turned about to be very easy after a long struggle. All I had to do was the following:

open httpd.conf and

  1. UNCOMMENT the modules LoadModule dav_svn_module and LoadModule authz_svn_module
  2. Comment the module LoadModule php5_module

It will look than like this:

#LoadModule php5_module modules/libphp5.so
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so

Not sure why the php5 module caused troubles but after commenting it out it all worked perfect.

In addition add the following lines to the httpd.conf file:

<Location /subversion>
DAV svn
SVNPath “/path_to_the_repository”

the location /subversion is the path that the user will have to enter into the browser. I.e. if I would change this to:

<Location /xyzproject> the user would have to enter the following URL in the browser http://yuor-domain-name:portnumber/xyzproject

Don’t forget to restart the Redmine stack.

Forums Redmine