Hooks in gitolite-admin are not executable

123 views
Skip to first unread message

Michel Jung

unread,
Oct 14, 2013, 11:14:58 AM10/14/13
to gito...@googlegroups.com
Hi,

I'd like to manage my hooks in the gitolite-admin repository as described in the gitolite documentation [1]. However, the hook (.gitolite/local/VREF/commit-acceptance) can't be executed because its filemode is 0600 (-rw-------) on server side after push.

I know about UMASK described in the documentation [2], but even it's set to 0077, the file's not executable. The documentation example says clearly:

"The default UMASK that gitolite uses makes all the repos and their contents have rwx------ permissions."

But that's just not the case. Any ideas?

[1] http://gitolite.com/gitolite/cust.html#pushcode
[2] http://gitolite.com/gitolite/rc.html

milk

unread,
Oct 14, 2013, 12:05:49 PM10/14/13
to gitolite
local/VREF/* is not part of a defined repo/content. It's part of gitolite-admin. I believe you must manually "activate" it yourself by committing the execute bit yourself. I'm pretty sure [2] only applies to repositories/.

-milki



--
You received this message because you are subscribed to the Google Groups "gitolite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gitolite+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Hope is a dimension of the spirit. It is not outside us, but within us. When you lose it, you must seek it again within yourself and in people around you -- not in objects or even events.    -
-Vaclav Havel

Patrick Lists

unread,
Oct 14, 2013, 12:07:33 PM10/14/13
to gito...@googlegroups.com
I saw something similar when trying out git HEAD master. IIRC there was
one commit since release 3.5.2 that changed some umask code. I reverted
to just using 3.5.2 + the code from the hooks commit and that worked
fine. Maybe there is a umask bug?

Regards,
Patrick

Sitaram Chamarty

unread,
Oct 14, 2013, 1:03:13 PM10/14/13
to Michel Jung, gito...@googlegroups.com
On 10/14/2013 08:44 PM, Michel Jung wrote:

> I'd like to manage my hooks in the gitolite-admin repository as
> described in the gitolite documentation [1]. However, the hook
> (.gitolite/local/VREF/commit-acceptance) can't be executed because its
> filemode is 0600 (-rw-------) on server side after push.
>
> I know about UMASK described in the documentation [2], but even it's
> set to 0077, the file's not executable. The documentation example says
> clearly:

This has nothing to do with UMASK (well, at least not the "x" bit
anyway).

The file is created in ~/.gitolite/local/hooks/common by a "git checkout
-f". Which, regardless of UMASK, will only reflect the "x" permission
(or lack thereof) that you gave it in your clone when you committed the
file.

So the short answer is, go to your admin clone, do a 'chmod +x' on the
file, and commit/push.
Reply all
Reply to author
Forward
0 new messages