Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3997188
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:22:17+00:00 2026-05-20T07:22:17+00:00

I’m using post-receive-email hook from the Git distribution to send e-mails to certain users

  • 0

I’m using post-receive-email hook from the Git distribution to send e-mails to certain users when Git repository is updated (hook invoked from post-receive).

All my repositories were managed manually. Now, I get so many repos and so many users and groups that I have to upgrade to some Git repository management system. I picked Gitolite.

But I am a bit at loss on how to configure the e-mail notifications.

Update: I will elaborate the question a bit:

First question is: Where should I put the hook and should I change it somehow so it would work with Gitolite?

Second question:

The standard post-receive-email hook depends on three parameters in *.git/config: hooks.envelopesender, hooks.emailprefix and hooks.mailinglist.

These parameters are, in general, different for each repository that I move under Gitolite. In practice, they are the same for the same permission groups — users, which have access to the repository, receive notifications, others — not.

I would like to avoid editing config file for each repository manually. It would be much more fun if I could configure everything in the same, centralized, place for whole Gitolite.

So, any hints?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T07:22:18+00:00Added an answer on May 20, 2026 at 7:22 am

    You can look at the doc hook for starters:

    where do I (the admin) put the hooks?

    In general, all hooks go into the hooks/common directory. Only the special post-update hook meant for the admin repo goes into hooks/gitolite-admin.

    But the GitoliteV3 doc on ‘mirroring’ provides an alternative to a custom hook.


    For the second question:

    I would like to avoid editing config file for each repository manually.
    It would be much more fun if I could configure everything in the same, centralized, place for whole Gitolite.

    The doc gitolite.conf is quite clear:

    repo specific git config commands

    Sometimes you want to specify git config settings for some of your repos.
    For example, you may have a custom post-receive hook that sends an email when a push happens, and this hook needs to know whom to send the email to, etc.

    You can set git config values by specifying something like this within a “repo” paragraph:

    example usage: if you placed a hook in hooks/common that requires configuration information that is specific to each repo, you could do this:

    repo gitolite
        config hooks.mailinglist = gitolite-commits@example.tld
        config hooks.emailprefix = "[gitolite] "
        config foo.bar = ""
        config foo.baz =
    

    The syntax is simple:

    config sectionname.keyname = [optional value_string]
    

    This does either a plain “git config section.key value” (for the first 3 examples above) or “git config --unset-all section.key” (for the last example).
    Other forms (--add, the value_regex, etc) are not supported.

    Note: this won’t work unless the rc file has the right settings; please see comments around the variable $GL_GITCONFIG_KEYS $GIT_CONFIG_KEYS (now in GitoliteV3 or ‘g3’) in gitolite rc file for details and security information.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
Does anyone know how can I replace this 2 symbol below from the string
I'm making a simple page using Google Maps API 3. My first. One marker
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a bunch of posts stored in text files formatted in yaml/textile (from
We are using XSLT to translate a RIXML file to XML. Our RIXML contains

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.