???????????????:
????Ubuntu 11.10 64λ
????Redmine 1.4.5.stable.10943
????git version 1.7.5.4 + gitolite
????????????redmine??汾??????????°汾?????÷????п????в??????????????
????redmine??git?????????????
????????redmine??GIT?????????????д??????????????????2?????????
????1?????????????GIT?汾???????д???????redmine???????????????
????2????GIT?汾????redmine???????????????????redmine??????С?
??????2??????????git+gitolite????????е??????????????
??????????????????·?????redmine?????????????redmine?д???????μ?汾??????汾??????????????汾??????????redmine?????????????????????????????????????????汾??????git??hooks????????汾?????£??????redmine????????汾??
???????????裺
????1????gitolite?????redmine???????
???????磺redmine????apache????????????????????www-data????www-data?????????ssh-keygen??????ssh key????~/.ssh/id_rsa.pub???????????gitolite????????keydir????У??????????.pub??????????
????cp ~/.ssh/id_rsa.pub /path/to/gitolite/admin/keydir/redmine.pub
???????gitolite??gitolite.conf???????????redmine??????????汾??
????2????redmine??????д???????汾??
??????redmine???????????www-data????????redmine???????????git???????
????mkdir git
????cd git
????git clone --mirror gituser@repo-path/repo-name.git
???????clone????????
????R access for leviathan/leviathan2-android DENIED to www-data
????fatal: The remote end hung up unexpectedly
?????????????git????????????????д??????????????
????3?????????汾???hooks??*???????汾??????????????*??
?????л????????????????????git?汾???user
????sudo su git-user-name
???????????????汾?????????hooks???
????cd /repo-path/repo-name.git/hooks
????cp post-receive.sample post-receive
???????post-receive?????????
????/usr/bin/git push --mirror /repo-path-to-mirror/repo-name.git
????4????????汾????????????????git?????redmine?????????
??????redmine??????????磺www-data???????e汾??
????cd /path-to-mirror-repo/repo-name.git
????git config core.sharedrepository 0644
??????root???????git???????redmine?????????
????groupmod -aG www-data gituser
????5??????
??????redmine????????git?汾????????汾???·??????“?汾??”Tab????У?????????汾????????????git hooks??????????????git?У???汾??????????????redmine????????????????????