1

I've cloned the git-multimail repo on my server, symlinked post-receive and git_multimail.py to ~/.gitolite/hooks/

Then ran gitolite setup --hooks-only

In my gitolite-admin/conf/gitolite.conf I've added:

repo gitolite-admin
   config multimailhook.environment = gitolite
   config multimailhook.mailingList = 'list@example.com'
   config multimailhook.refchangelist = user@example.com,user@example.com
   RW+     =   user

And enabled in ~/.gitolite.rc:

GIT_CONFIG_KEYS                 =>  'multimail.*',

Sendmail is properly delivering my other emails.

I'm expecting mails on commits, but nothing happens. How to debug this?

I can see that there's an option to enable logging to sys.stdout in post-receive, but where can I see the logs?

takeshin
  • 49,108
  • 32
  • 120
  • 164

2 Answers2

2

I've just added more documentation about how to set up git-multimail with gitolite: https://github.com/git-multimail/git-multimail/blob/master/doc/gitolite.rst

With git 2.7 (Q4 2015), this setup process will be described in git/git/contrib/hooks/multimail/doc/gitolite.rst in Git's source code.

Matthieu Moy
  • 15,151
  • 5
  • 38
  • 65
1

The problem was the actual directory where to put the hooks (I used wrong one: .gitolite/hooks/)

This directory is controlled in .gitolite.rc file, LOCAL_CODE variable (which is commented by default) as described here: http://gitolite.com/gitolite/gitolite.html#localcode

    # this one is managed directly on the server
    LOCAL_CODE                =>  "$ENV{HOME}/local",

    # or you can use this, which lets you put everything in a subdirectory
    # called "local" in your gitolite-admin repo.  For a SECURITY WARNING
    # on this, see http://gitolite.com/gitolite/cust.html#pushcode
    # LOCAL_CODE                =>  "$rc{GL_ADMIN_BASE}/local",

This means, after commenting out the default variable setting, you should put your hooks in /home/git/local/hooks/common/ or enable repo specific hooks, as described in .gitolite.rc, set up executable permissions and run gitolite setup --hooks-only.

takeshin
  • 49,108
  • 32
  • 120
  • 164