Commit-msg hook

Hello,

I’m trying to configure my gitlab to execute an commit-msg hook.
In my local repo it work well, but when I put the hook file on "/home/git/gitlab-shell/hooks according the official documentation (https://docs.gitlab.com/ee/administration/custom_hooks.html) the rule does not aplly.

What I need to do to make the rule work?

This is my commit-msg file:

#!/usr/bin/env ruby

commit_regex=‘(TICKET#[0-9]{16} - [a-zA-Z0-9 ]{20,})’
error_msg=“Commit message outside of the adopted pattern, please follow the recommendations below:
TICKET#2016110300000001 - This is my commit message”

if ! grep -iqE “$commit_regex” “$1”; then
echo “$error_msg” >&2
exit 1
fi