Unable to install hooks
acosonic opened this issue · 3 comments
acosonic commented
This is what's in log:
Started GET "/admin/settings/plugin/redmine_git_hosting/install_gitolite_hooks" for 94.247.200.50 at 2022-04-11 10:55:15 +0000
Processing by SettingsController#install_gitolite_hooks as JS
Parameters: {"id"=>"redmine_git_hosting"}
Current user: admin (id=1)
Completed 500 Internal Server Error in 56ms (ActiveRecord: 6.9ms)
TypeError (no implicit conversion of nil into String):
plugins/redmine_git_hosting/lib/redmine_git_hosting/config/gitolite_hooks.rb:34:in `join'
plugins/redmine_git_hosting/lib
Ruby 2.7.5
Redmine 4.2.5
Plugin 5.0.1-master
acosonic commented
seems that gitolite_local_code_dir is empty
so I have replaced line 34 of lib/redmine_git_hosting/config/gitolite_hooks.rb
with:
File.join gitolite_home_dir, 'hooks', 'common'
and it's green now...
prahal commented
I believe this is an incorrect workaround as gitolite will not find the hooks in gitolite_home_dir/hooks/common. The plugin will install in gitolite_home_dir/.gitolite/hooks/common for gitolite 2 and gitolite_home_dir/local/hooks/common for gitolite3. YOu issue seems that gitolite_home_dir/local is not created. It was on my install. Maybe you had another error beforehand that dismissed its creation. But the above workaround is not good.