Actually, it *is* a gitlab problem. It looks like gitlab only accepts the ruby shebang at the top of the custom hook file.
#!/bin/sh causes an error, while #!/usr/bin/env ruby does not. On Thursday, May 21, 2015 at 11:20:59 AM UTC-4, Aaron Boxer wrote: > > This turned out to be an issue with the hook files themselves. > Not a gitlab problem. > > > On Wednesday, May 20, 2015 at 9:57:42 AM UTC-4, Aaron Boxer wrote: >> >> Hello, >> I have a brand new gitlab install via the omnibus package, and I am >> trying to set up custom hooks. >> In my bare repo folder, I have created a custom_hooks folder, with a >> post_receive file inside. >> The file is owned by git user, and executable bit is set. >> >> However, when I commit to the repo, I get the following error from the >> remote: >> >> Counting objects: 5, done. >> Writing objects: 100% (3/3), 251 bytes | 0 bytes/s, done. >> Total 3 (delta 0), reused 0 (delta 0) >> remote: /opt/gitlab/embedded/lib/ruby/2.1.0/open3.rb:193:in `spawn': No >> such fil >> e or directory - >> /var/opt/gitlab/git-data/repositories/aaron/test.git/custom_hoo >> ks/post-receive (Errno::ENOENT) >> remote: from /opt/gitlab/embedded/lib/ruby/2.1.0/open3.rb:193:in >> `popen_ >> run' >> remote: from /opt/gitlab/embedded/lib/ruby/2.1.0/open3.rb:188:in >> `popen2 >> e' >> remote: from >> /opt/gitlab/embedded/service/gitlab-shell/lib/gitlab_custom >> _hook.rb:33:in `call_receive_hook' >> remote: from >> /opt/gitlab/embedded/service/gitlab-shell/lib/gitlab_custom >> _hook.rb:15:in `post_receive' >> remote: from hooks/post-receive:21:in `<main>' >> >> Any ideas? >> >> Thanks! >> >> Aaron >> >> >> -- You received this message because you are subscribed to the Google Groups "GitLab" group. To unsubscribe from this group and stop receiving emails from it, send an email to gitlabhq+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/gitlabhq/b1b3b21b-9ad6-4443-9bdb-59367750fb70%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.