这就是为什么我们在我们的中央 git repo 服务器上安装了gitolite V3(通过简单地克隆它的 repo并像在这个安装脚本中一样安装它)。
Gitolite 将拦截任何 git 命令,并且(除了它的主要授权框架功能之外)会将所述命令记录在~/.gitolite/logs/gitolite-log-xxx
.
以下是此类日志的摘录:
2012-08-16.12:20:19 29507 system,/home/gitadmin/gitolite/bin/triggers/post-compile/update-git-configs,POST_COMPILE
2012-08-16.12:20:19 29507 system,/home/gitadmin/gitolite/bin/triggers/post-compile/update-gitweb-access-list,POST_COMPILE
2012-08-16.12:20:19 29507 system,/home/gitadmin/gitolite/bin/commands/access,%,gitweb,R,any
2012-08-16.12:20:19 29507 system,/home/gitadmin/gitolite/bin/commands/git-config,-r,%,gitweb\.
2012-08-16.12:20:19 29507 system,/home/gitadmin/gitolite/bin/triggers/post-compile/update-git-daemon-access-list,POST_COMPILE
2012-08-16.12:20:20 29507 system,/home/gitadmin/gitolite/bin/commands/access,%,daemon,R,any
2012-08-16.12:20:20 29507 END
2012-08-20.07:39:12 17683 ssh ARGV=gitoliteadm SOC=git-upload-pack 'gitolite-admin' FROM=127.0.0.1
2012-08-20.07:39:12 17683 access(gitolite-admin, gitoliteadm, R, 'any'),-> refs/.*
2012-08-20.07:39:12 17683 trigger,Writable,access_1,ACCESS_1,gitolite-admin,gitoliteadm,R,any,refs/.*
2012-08-20.07:39:12 17683 pre_git gitolite-admin gitoliteadm R any -> refs/.*
2012-08-20.07:39:12 17683 system,git,shell,-c,git-upload-pack '/home/gitadmin/repositories/gitolite-admin.git'
2012-08-20.07:39:12 17683 END
2012-08-16.12:20:19 29507 system,/home/gitadmin/gitolite/bin/triggers/post-compile/update-git-configs,POST_COMPILE
2012-08-16.12:20:19 29507 system,/home/gitadmin/gitolite/bin/triggers/post-compile/update-gitweb-access-list,POST_COMPILE
2012-08-16.12:20:19 29507 system,/home/gitadmin/gitolite/bin/commands/access,%,gitweb,R,any
2012-08-16.12:20:19 29507 system,/home/gitadmin/gitolite/bin/commands/git-config,-r,%,gitweb\.
2012-08-16.12:20:19 29507 system,/home/gitadmin/gitolite/bin/triggers/post-compile/update-git-daemon-access-list,POST_COMPILE
2012-08-16.12:20:20 29507 system,/home/gitadmin/gitolite/bin/commands/access,%,daemon,R,any
2012-08-16.12:20:20 29507 END
2012-08-20.07:39:12 17683 ssh ARGV=gitoliteadm SOC=git-upload-pack 'gitolite-admin' FROM=127.0.0.1
2012-08-20.07:39:12 17683 access(gitolite-admin, gitoliteadm, R, 'any'),-> refs/.*
2012-08-20.07:39:12 17683 trigger,Writable,access_1,ACCESS_1,gitolite-admin,gitoliteadm,R,any,refs/.*
2012-08-20.07:39:12 17683 pre_git gitolite-admin gitoliteadm R any -> refs/.*
2012-08-20.07:39:12 17683 system,git,shell,-c,git-upload-pack '/home/gitadmin/repositories/gitolite-admin.git'
2012-08-20.07:39:12 17683 END