Project

General

Profile

Can't get automatic svn creation to work

Added by Marc Kraak over 13 years ago

I followed instruction and this great product runs fine on my Ubuntu Server, except the svn creation part
Followed these instructions:
http://www.redmine.org/wiki/redmine/Repositories_access_control_with_apache_mod_dav_svn_and_mod_perl
http://www.redmine.org/wiki/redmine/HowTo_Automate_repository_creation
http://www.turnkeylinux.org/forum/support/20091218/redmine-and-svn
Managed to upgrade rubygems from 1.3.5 to 1.3.7, needed to install activeresource, which is needed for the cronjob:
*/2 * * * * ruby /usr/share/redmine/extra/svn/reposman.rb --redmine localhost --svn-dir /var/svn --owner www-data --url file:///var/svn/ >> /var/log/reposman.log
The problem now is that the cronjob log (reposman.log) tell me that there are no project defined (Actually there are projects, Enable WS for repository is enabled)
Error: no project found, perhaps you forgot to "Enable WS for repository management"


Replies (15)

RE: Can't get automatic svn creation to work - Added by Felix Schäfer over 13 years ago

You must supply the key WS key to reposman.

RE: Can't get automatic svn creation to work - Added by Marc Kraak over 13 years ago

Thanks, but it's still not working, I tried

/usr/share/redmine/extra/svn/reposman.rb --redmine localhost -k=uf4yxZVh9d46yexwwLrB --svn-dir /var/svn --owner www-data --url file:///var/svn/ >> /var/log/reposman.log
/usr/share/redmine/extra/svn/reposman.rb --redmine localhost --key=uf4yxZVh9d46yexwwLrB --svn-dir /var/svn --owner www-data --url file:///var/svn/ >> /var/log/reposman.log
/usr/share/redmine/extra/svn/reposman.rb --redmine localhost --key='uf4yxZVh9d46yexwwLrB' --svn-dir /var/svn --owner www-data --url file:///var/svn/ >> /var/log/reposman.log
/usr/share/redmine/extra/svn/reposman.rb --redmine localhost --key=uf4yxZVh9d46yexwwLrB --svn-dir /var/svn --owner www-data --url file:///var/svn/ >> /var/log/reposman.log

and also several positions of the --key parameter within the command, do you have another suggestion?

Regards,

Marc

RE: Can't get automatic svn creation to work - Added by Felix Schäfer over 13 years ago

You shouldn't post your key in the open like that :-)

Does any project have the repository module enabled?

RE: Can't get automatic svn creation to work - Added by Marc Kraak over 13 years ago

I know about the key, will change that asap after it works, but thanks
Regarding your question:
Yes, in the tab "modules" Repository is enabled
But in the tab "repository" I didn't fill in anything (this will be filled in automatically, right?)

RE: Can't get automatic svn creation to work - Added by Marc Kraak over 13 years ago

Can it possibly has something to do with db configuration? Or isn't that possible if Redmine works fine.

RE: Can't get automatic svn creation to work - Added by Felix Schäfer over 13 years ago

The repository tab will be filled automatically, yes.

Ok, so the only remaining problem could be the address to your redmine:

  1. Are you sure your redmine also answers on localhost? If it is on a named virtualhost, it won't.
  2. Is redmine at the root of the host, or in a subdirectory?

You can also have a look at /your/redmine/log/production.log to see incoming request, reposman.rb should request something under /sys, and see if the request gets there and if there is an error.

RE: Can't get automatic svn creation to work - Added by Felix Schäfer over 13 years ago

Marc Kraak wrote:

Can it possibly has something to do with db configuration? Or isn't that possible if Redmine works fine.

Reposman isn't dependent on DB access.

RE: Can't get automatic svn creation to work - Added by Marc Kraak over 13 years ago

my redmine is located on local server (192.168.2.190)
access from outside by project.mydomainname.nl which is frameforwarded to mydomain.dyndns.org at port 85
my router forwards the request to the server on port 80
redmine is located in /usr/share/redmine (symbolic link /var/www/redmine)
I placed a php file in the webroot, which redirects to /redmine
apache configuration is attached to this message and located in /etc/apache/sites-available (and sites-enabled) default

Locally I can work on redmine with:
project.mydomainname.nl
http://mydomain.dyndns.org:85/redmine
and http://192.168.2.190/redmine

Which host should be entered in the reposman command?

I don't see any reposman message within the production.log

default (2.37 KB) default

RE: Can't get automatic svn creation to work - Added by Felix Schäfer over 13 years ago

Marc Kraak wrote:

Locally I can work on redmine with:
project.mydomainname.nl
http://mydomain.dyndns.org:85/redmine
and http://192.168.2.190/redmine

Which host should be entered in the reposman command?

It should work with any of them, though I'd say http://192.168.2.190/redmine would be the safest bet. http://localhost/redmine might work too, but http://localhost alone won't work, because IIRC reposman.rb won't follow redirects.

I don't see any reposman message within the production.log

The reposman doesn't get to the redmine yet ;-)

RE: Can't get automatic svn creation to work - Added by Marc Kraak over 13 years ago

localhost/redmine did the trick, thanks very much!

However there's still one issue, svn is now in /var/svn/projectcode
I made a symbolic link in /var/www/svn to /var/svn
But cannot connect to svn (error 500)
Questions:
What would be the correct svn url?
Which authentication user/pass to use, can user/pass be changed from the GUI?

Thanks,

Marc

RE: Can't get automatic svn creation to work - Added by Felix Schäfer over 13 years ago

You don't need the symlink to /var/www/svn. Have a look at the apache log to see what causes the 500 error. The credentials you have to put in there are the same as your redmine credentials, provided you are member of the project with the same identifier (administrator or not doesn't matter, you need to be member) and have browse and/or commit rights in redmine for the repository.

RE: Can't get automatic svn creation to work - Added by Marc Kraak over 13 years ago

I cannot find errors in Apache related to this. I think the url is the problem. I don't have a clue which to use, the project repository configuration says file:///var/svn/projectid, but that won't work from another workstation than the svn server itself, tried http://local_ip/svn/projectid,svn://local_ip/svn/projectid etc. Do you have a clue?

RE: Can't get automatic svn creation to work - Added by Marc Kraak over 13 years ago

I've fixed it, problem was a wrong databasename in the apache configuration. Felix, thank you very much for helping me! ;)

    (1-15/15)