How to add description for a repository in Gitolit

2020-07-18 10:36发布

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..?

3条回答
别忘想泡老子
2楼-- · 2020-07-18 11:07

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 .

查看更多
地球回转人心会变
3楼-- · 2020-07-18 11:10

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.

查看更多
该账号已被封号
4楼-- · 2020-07-18 11:11

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.

查看更多
登录 后发表回答