5

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 ?

FMaz008
  • 429
  • 3
  • 12
  • 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 04 '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 04 '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 04 '11 at 21:00
  • Would the recent commit https://github.com/sitaramc/gitolite/commit/1006eba2fc0068134bde079956dc835f488918da help? – VonC Apr 07 '11 at 04:19
  • Look into /srv/gitolite/.gitolite/ -- is your folders there? – datacompboy May 27 '11 at 08:53

1 Answers1

1

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.

David
  • 1,012
  • 6
  • 9