Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm running a Gitolite server, and I was thinking of having 1 config file per repository.

For now I've this gitolite.conf file:

@php_dev = userA userB
@int_dev = userC
@lead = userD
@admin = @php_dev

repo    gitolite-admin
        RW+     =   @admin

repo    testing
        RW+     =   @all

include "repositories/*.conf"

And then I have the gitolite-admin/conf/repositories/cms/admin/repoA.conf file:

repo    cms/admin/repoA
        RW+     =   @php_dev
        RW      =   @int_dev
        R       =   @lead

When I commit, I only have the following warning:

remote: the following users have no pubkeys:
remote: userC

and that's true, userC doesn't have a pubkey yet. ( I'm just mentionning it in case that matters )

Then I look on server, in the /home/git/repositories/ folder:

git@FX55TMP:~/repositories$ ls -la
total 16
drwx------ 4 git git 4096 2011-04-03 22:16 .
drwxr-xr-x 6 git git 4096 2011-04-03 22:16 ..
drwx------ 8 git git 4096 2011-04-03 23:21 gitolite-admin.git
drwx------ 7 git git 4096 2011-04-03 23:21 testing.git

Their is no cms/admin/ folder that have been auto-created -- as mentionned in the documentation -- , so that let me think that my config file is not loaded.

Did I've made something wrong ?

share|improve this question
    
Have you tried it with userC having a pubkey ? I'm not at my gitolite-admin machine, so I can't try it out, but I think gitolite won't actually load a command change if there's any kind of error. –  Brian Apr 4 '11 at 18:32
    
Not yet (But I will, but not today), but I've repository defined right after and as they are in the very same file, gitolite initialized them correctly. But not the one in the include file. Also, it's only a warning, so the parsing process should not be stoped. –  FMaz008 Apr 4 '11 at 20:21
    
I've never tried multiple conf files, I'll give it a shot when I get home and see what happens. –  Brian Apr 4 '11 at 21:00
    
Would the recent commit github.com/sitaramc/gitolite/commit/… help? –  VonC Apr 7 '11 at 4:19
    
Look into /srv/gitolite/.gitolite/ -- is your folders there? –  datacompboy May 27 '11 at 8:53

1 Answer 1

up vote 1 down vote accepted

You include "repositories/*.conf", but your file is in repositories/cms/admin/repoA.conf. Asterisk wildcards (at least in gitolite) will not match subdirectory components. They refer to the wildcard as a glob in http://sitaramc.github.com/gitolite/doc/gitolite.conf.html, and generally shell globs will only match within the directory they are used.

Since it doesn't find any repositories/*.conf (and thus never your repoA.conf) it will not be creating those repositories.

share|improve this answer
    
So I should use: repositories/*/*/*.conf ? –  FMaz008 Jul 15 '11 at 19:40
    
Since gitolite uses perl's glob() function to evaluate it, that should work. I haven't tested though. –  David Jul 15 '11 at 19:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.