Skip to content

Can't install hooks #642

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

Closed
sdfg2 opened this issue Jan 9, 2017 · 13 comments
Closed

Can't install hooks #642

sdfg2 opened this issue Jan 9, 2017 · 13 comments
Assignees
Labels
Milestone

Comments

@sdfg2
Copy link

sdfg2 commented Jan 9, 2017

I've gone through the install guide, everything works except I can't install the hooks.

2017-01-09 19:23:13 +0000 [ERROR] Non-zero exit code pid 1895 exit 1 for sudo -n -u git -i sh``

I've tried running sudo -n -u git -i sh ls and pwd to test, and it says 'cannot execute binary file'.

Is there some information somewhere about what permissions are needed and where?

I'm using nginx + uwsgi, the config test page shows correct PATH variables (which was the only thing I could think of).

Environment:
  Redmine version                3.3.2.stable
  Ruby version                   2.1.9-p490 (2016-03-30) [x86_64-linux]
  Rails version                  4.2.7.1
  Environment                    production
  Database adapter               PostgreSQL
SCM:
  Subversion                     1.9.4
  Mercurial                      3.8.4
  Cvs                            1.12.12
  Bazaar                         2.5.1
  Git                            2.10.2
  Filesystem                     
  Xitolite                       2.10.2
Redmine plugins:
  redmine_bootstrap_kit          0.2.5
  redmine_git_hosting            1.2.2
@antonionardella
Copy link

antonionardella commented Jan 9, 2017

Hello,

same here:

2017-01-09 22:41:44 +0100 [INFO] Hook 'git_multimail.py' does not exist, installing it ...
2017-01-09 22:41:44 +0100 [DEBUG] Getting Gitolite version...
2017-01-09 22:41:44 +0100 [DEBUG] Getting Gitolite version...
2017-01-09 22:41:44 +0100 [INFO] Installing hook '/home/redmine/redmine/plugins/redmine_git_hosting/contrib/hooks/post-receive/lib/git_multimail.py' in '/opt/gitolite/local
/hooks/common/post-receive.d/git_multimail.py'
2017-01-09 22:41:44 +0100 [DEBUG] Getting Gitolite version...
2017-01-09 22:41:44 +0100 [DEBUG] Non-zero exit code pid 21049 exit 2 for `sudo -n -u git -i sh`
2017-01-09 22:41:44 +0100 [ERROR] Non-zero exit code pid 21049 exit 2 for `sudo -n -u git -i sh`
2017-01-09 22:41:44 +0100 [DEBUG] Getting Gitolite version...
Environment:
  Redmine version                3.3.0.devel
  Ruby version                   2.3.0-p0 (2015-12-25) [x86_64-linux]
  Rails version                  4.2.6
  Environment                    production
  Database adapter               Mysql2
SCM:
  Git                            2.1.4
  Filesystem                     
  Xitolite                       2.1.4
Redmine plugins:
  redmine_bootstrap_kit          0.2.5
  redmine_default_assign         0.6
  redmine_git_hosting            1.2.2
  redmine_mail_checker           1.0.0

@maxiv
Copy link

maxiv commented Jan 10, 2017

Same problem.

xstasi pushed a commit to 2ndquadrant-it/redmine_git_hosting that referenced this issue Jan 17, 2017
xstasi pushed a commit to 2ndquadrant-it/redmine_git_hosting that referenced this issue Jan 17, 2017
@sdfg2
Copy link
Author

sdfg2 commented Jan 19, 2017

That change doesn't seem to work.

@OgreTransporter
Copy link

That change worked for me. But only with installing hooks over RAILS_ENV=production rake redmine_git_hosting:install_hook_files

@ghost
Copy link

ghost commented Feb 7, 2017

My issue looks similar.
installing hooks by:

user@host:/opt/redmine$ bundle exec rake redmine_git_hosting:install_gitolite_hooks RAILS_ENV=production

 * Installing/updating Gitolite hooks :
---
:hook_files:
  redmine_gitolite.rb: 1
  mail_notifications.py: 1
  git_hosting_config.rb: 1
  git_hosting_custom_hook.rb: 1
  git_hosting_http_helper.rb: 1
  git_hosting_hook_logger.rb: 1
  git_hosting_post_receive.rb: 1
  git_multimail.py: 1
:global_params:
  redmineurl: true
  debugmode: true
  asyncmode: true
:mailer_params:
  mailer: true
  environment: true
  smtpauth: true
  smtpserver: true
  smtpport: true
  smtpuser: true
  smtppass: true
   Done !


 * Installing/updating Gitolite hook parameters :
---
redmineurl: true
debugmode: true
asyncmode: true
   Done !

but in redmine settings all hooks marked by exclamations

@bougui
Copy link

bougui commented Feb 9, 2017

Hello guy's,

we are in the same boat and I think I have more info

If you look in the sudoers log file you will see this carracter #12 (Line Feed) after /var/lib/gitolite3/local#012/ on each call that the install hook procedure does.

This also explain why we see a newline in the git_hosting.log

2017-02-08 19:17:55 -0500 [INFO] Hook 'git_hosting_config.rb' does not exist, installing it ...
2017-02-08 19:17:55 -0500 [INFO] Installing hook '/var/www/redmine/redmine-3.1.6/plugins/redmine_git_hosting/contrib/hooks/post-receive/lib/git_hosting_config.rb' in '/var/lib/gitolite3/local
/hooks/common/lib/git_hosting/config.rb'
2017-02-08 19:17:55 -0500 [ERROR] Non-zero exit code pid 27165 exit 1 for sudo -n -u gitolite3 -i sh

Maybe this will shed some light to help provide a solution.

our version:
redmine_git_hosting 1.2.2
Redmine version 3.1.6.stable
Centos 7.
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]

Thanks

@avestnik
Copy link

I observe the same behaviour with extra Line Feed in git_hosting.log.

i work on
redmine_git_hosting 1.2.2
Redmine version 3.3.0.stable
gitolite3 3.6.6-1.el7 on git 1.8.3.1
Centos 7.
ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-linux]

@OgreTransporter
Copy link

I'm working with redmine 3.3.1.stable and redmine_git_hosting 1.2.1. Upgrading to redmine 3.3.2.stable and redmine_git_hosting 1.2.2 is not an option, because it's not working. It's easy to update redmine but redmine_git_hosting is not working anymore. Also I've tried to install a new system in a VM but git is also not working.

@n-rodriguez n-rodriguez self-assigned this Feb 16, 2017
@n-rodriguez n-rodriguez added this to the v1.2.3 milestone Feb 16, 2017
@n-rodriguez
Copy link
Contributor

Fixed by #646

@gituser
Copy link

gituser commented Apr 12, 2017

I'm sorry, but it seems v1.2.2 is completely broken.. Why not release a v1.2.3 ?

I've spent nearly whole day because of this dealing with various issues..

@yspreen
Copy link

yspreen commented Apr 27, 2017

Talking about dealing with issues.. How do I fix this now for 1.2.2?

@bougui
Copy link

bougui commented Apr 27, 2017

Hello if you look into #666 you will see how to use branch 1.2.x, it worked for me and others.

Good luck !

@yspreen
Copy link

yspreen commented Apr 27, 2017

Thanks!
Though I just went with applying pull #646 manually, and after installing the hooks reverting to 1.2.2. There has to be a reason why 1.2.2 is the release version, no?

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

No branches or pull requests

9 participants