Google is swarming with pages with this error, I’ll add another one to the buzz.
In my case it was as simple as the executable bit missing on gitosis post-* hooks.
chmod u+x /path/to/your/gitosis-admin.git/hooks/post-*
fixed the issue.
Note to self: make sure to switch to gitlab/gitlab-shell sometime soon, gitosis is obsolete for quite some time now.