2011-01-23 199 views
2

我正在使用远程git仓库,在提交时不支持电子邮件通知。我想知道是否有人知道任何手段/工具来监视和跟踪一个或多个分支上的提交?git远程分支监控

感谢

奥利弗

回答

1

您可以看看SCuMD GIT服务器。我描述这里的基本配置:

Best Mac OSX and Windows Git Clients, servers and diff tools?

它支持电子邮件通知(和很多像DB用户授权,独立的SSH服务器,等...等凉的东西)。

这里是例如配置与电子邮件通知:

<beans:beans xmlns="http://asolutions.com/schema/spring/scumd" xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://asolutions.com/schema/spring/scumd http://asolutions.com/schema/spring/scumd/scumd-0.1.0.xsd"> 

    <git-ssh-server port="1122" repositories-base="${gitRepos}"> 
     <default-server-key-pair /> 

     <listeners> 
      <!-- 
       Email listener will send emails to provided email/users/groups(all users in each group) when event is triggered. 
       Each configuration element can be defined either as attribute or inner tag. 

       event attribute can have following values: 
        * authenticationSuccess 
        * authenticationFail 
        * authorizationSucces 
        * authorizationFail 
        * repoCreate 
        * pull 
        * push 
        * commit 

       Note: If you want to use email listeners, you should also define <email-sender /> tag. 
      --> 
      <email event="push" emails="[email protected], [email protected]" subject="My Notification!"> 
       <users>u1, u2</users> 
       <groups>g1, g2</groups> 
      </email> 

     </listeners> 
    </git-ssh-server> 

    <!-- 
     If you are using email listeners, you should also define email-sender 
     in order to define SMTP/SMTPS configuration 
    --> 
    <email-sender host="my.host" port="465" protocol="smtps" 
        auth="true" user="mailsUser" password="secret" 
        from="[email protected]" replay-to="[email protected]" 
        force-email="[email protected]" /> 

    <acl> 
     <repository path="**/*.git"> 
      <groups allow="ReadWrite, Create" list="g1, g2" /> 
     </repository> 
    </acl> 

    <simple-user-dao> 
     <group name="g1"> 
      <user name="u1" email="[email protected]"> 
       <public-key file="/path/to/the/id_rsa.pub" /> 
       <public-key file="/path/to/the/other/id_rsa.pub" /> 
      </user> 

      <user name="u2" email="[email protected]"> 
       <public-key file="/path/to/another/key" /> 
      </user> 
     </group> 

     <group name="g2" /> 
    </simple-user-dao> 
</beans:beans> 

服务器仍处于测试阶段,但它的功能全面,并且我们用它在工作中(没有问题,)。

4

取每隔一分钟。如果有变化,对它们做出反应(例如发送电子邮件)。