Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add description for a repository in Gitolite configuration

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

like image 921
arulraj.net Avatar asked Dec 09 '22 20:12

arulraj.net


2 Answers

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 .

like image 114
arulraj.net Avatar answered Apr 29 '23 06:04

arulraj.net


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.

like image 33
schnell18 Avatar answered Apr 29 '23 08:04

schnell18