Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gitolite hooks are not installed until the plugin settings page is opened #303

Closed
ghost opened this issue Oct 28, 2014 · 3 comments
Closed
Assignees
Milestone

Comments

@ghost
Copy link

ghost commented Oct 28, 2014

How to reproduce:
1/ Have a fresh install of redmine+gitolite+plugin as explained here https://jbox-web.github.io/redmine_git_hosting/howtos/index.html
2/ Check /home/git/.gitolite/hooks/common/ --> the content will be the single file "update"
3/ Log in as admin, go to the Administration/"Redmine Git Hosting" page
4/ Check /home/git/.gitolite/hooks/common/ --> the content will be the file "update" + poste-receive and post-receive.d dir

Is there another way to have these hook files created?
This is important to me, as I'm trying to automate the install.

Thank you in advance for your help.

@n-rodriguez
Copy link
Contributor

Yep. You're right... A rake task would do the job ;)

Then you could fully automate your install :

  • set your settings in init.rb (with sed, or erb, or jinja2, or whatever)
  • then rake redmine_git_hosting:restore_default_settings
  • then rake redmine_git_hosting:create_gitolite_hooks

You must set settings in init.rb because we need some of them in Gitolite hooks install.
rake redmine_git_hosting:restore_default_settings will set them in database.

@ghost
Copy link
Author

ghost commented Nov 18, 2014

Thank you Nicolas,
I could not launch it spending 10 min (goal not found launched in <redmine_home>, missing dependency when launched in <git_plugin_home>), using v 0.78
I will try harder as soon as I get a chance and let you know the results.

@n-rodriguez n-rodriguez added this to the v0.8 milestone Dec 21, 2014
n-rodriguez pushed a commit that referenced this issue Dec 23, 2014
@n-rodriguez
Copy link
Contributor

Fully automated install (to add to the doc) :

  • set your settings in init.rb (with sed, or erb, or jinja2, or whatever)
  • then bundle exec rake redmine_git_hosting:restore_default_settings RAILS_ENV=production
  • then bundle exec rake redmine_git_hosting:install_gitolite_hooks RAILS_ENV=production

You can also update hooks with :
bundle exec rake redmine_git_hosting:install_hook_files RAILS_ENV=production

or update hook params with :
bundle exec rake redmine_git_hosting:install_hook_parameters RAILS_ENV=production

It dumps the result to the console.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant