问题
I am using gitolite for user maintenance for my GIT server. Everything works fine except repo description. I have setup the description for a repo like "reponame = repo description" in gitolite.conf. Earlier version (before v3.x) its working. Now its not working. For your information I am using
- gitolite v3.1
- GIT v1.7.1
- Perl v5.10.1
Here is my gitolite.conf file http://pastebin.com/DYCK3uRL or http://arulraj.net/gitolite.conf. The post-receive-email mail subject and signature not have description because of that repo description file not generated automatically using gitolite. How can I fix this..?
回答1:
I am happy to say its fixed now. I added this https://github.com/sitaramc/gitolite/blob/master/src/triggers/post-compile/update-description-file script in gitolite post_compile section.
1.Open the .gitolite.rc file in HOME directory and edit post_compile section.
POST_COMPILE =>
[
'post-compile/ssh-authkeys',
'post-compile/update-git-configs',
'post-compile/update-gitweb-access-list',
'post-compile/update-git-daemon-access-list',
'post-compile/update-description-file',
],
2.Then add description for repo in gitolite.conf. Please refer the below
repo testing
RW+ = @all
desc = "GIT testing"
3.Then commit and push your changes.
Now the description is automatically created. My new conf file here http://pastebin.com/c8Ggfbdi or http://arulraj.net/gitolite.conf.new .
回答2:
As of gitolite 3.5, you don't have to put the POST_COMPILE
stuff. Just as enable the "cgit"
option with ENABLE => [ 'cgit' ]
. And you run the gitolite setup, then the .git/description
files will be created with value from gitweb.description
option.
回答3:
From adding a description to repos you created
ssh git@host desc -h
Watch out the WRITER_CAN_UPDATE_DESC setting to avoid the "FATAL: you are not authorized" error.
来源:https://stackoverflow.com/questions/13015001/how-to-add-description-for-a-repository-in-gitolite-configuration