git 如何在 Gitolite 配置中为存储库添加描述
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13015001/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to add description for a repository in Gitolite configuration
提问by arulraj.net
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 为我的 GIT 服务器进行用户维护。除了 repo 描述外,一切正常。我已经在 gitolite.conf 中设置了像“reponame = repo description”这样的 repo 的描述。早期版本(v3.x 之前)可以正常工作。现在它不工作。为了您的信息,我正在使用
- gitolite v3.1
- GIT v1.7.1
- Perl v5.10.1
- gitolite v3.1
- git v1.7.1
- Perl v5.10.1
Here is my gitolite.conf file http://pastebin.com/DYCK3uRLor 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..?
这是我的 gitolite.conf 文件http://pastebin.com/DYCK3uRL或http://arulraj.net/gitolite.conf。post-receive-email 邮件主题和签名没有描述,因为 repo 描述文件不是使用 gitolite 自动生成的。我怎样才能解决这个问题..?
回答by arulraj.net
I am happy to say its fixed now. I added this https://github.com/sitaramc/gitolite/blob/master/src/triggers/post-compile/update-description-filescript in gitolite post_compile section.
我很高兴地说它现在已经修复了。我在 gitolite post_compile 部分添加了这个https://github.com/sitaramc/gitolite/blob/master/src/triggers/post-compile/update-description-file脚本。
1.Open the .gitolite.rcfile in HOME directory and edit post_compile section.
1.打开HOME目录下的.gitolite.rc文件,编辑post_compile部分。
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
2.然后在gitolite.conf中添加repo的描述。请参考以下
repo testing
RW+ = @all
desc = "GIT testing"
3.Then commit and push your changes.
3.然后提交并推送您的更改。
Now the description is automatically created. My new conf file here http://pastebin.com/c8Ggfbdior http://arulraj.net/gitolite.conf.new.
现在描述是自动创建的。我的新 conf 文件在这里http://pastebin.com/c8Ggfbdi或http://arulraj.net/gitolite.conf.new。
回答by schnell18
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.
从 gitolite 3.5 开始,您不必放置这些POST_COMPILE
东西。就像启用"cgit"
选项一样ENABLE => [ 'cgit' ]
。然后您运行 gitolite 设置,然后.git/description
将使用gitweb.description
选项中的值创建文件。
回答by Pierre de LESPINAY
From adding a description to repos you created
ssh git@host desc -h
Watch out the WRITER_CAN_UPDATE_DESC
settingto avoid the "FATAL: you are not authorized" error.
注意WRITER_CAN_UPDATE_DESC
设置以避免“致命:您未被授权”错误。