Search code examples
gitolite

gitolite3: Change a normal repo into a wild repo?


I have created about 20 repos by manual entries:

repo u1
    RW+ = u1

repo u2
    RW+ = u2
...

Now I have noticed, that I could have used:

@u = u1 u2
repo CREATOR
    C = @u
    RW+ = CREATOR
    R = READERS
    RW = WRITERS

Is there an easy way to switch from the upper normal repos to the wild card repos?

(Of course, now I notice, that I should have used something like user/CREATOR/..* but there is no easy way without annoying 20 users)


Solution

  • The gitolite manual mentions:

    If the repos are wildcard repos that already match some repo regex in the conf file, you need to manually create the gl-creator file, like so:

    echo username > ~/repositories/path/to/repo.git/gl-creator
    

    I haven't yet found this to be common enough to bother wrapping it in a nice interface or command.

    So you can try and test at least for one repo:

    • the wildcard syntax you mention in your answer
    • adding gl-creator file (with the right username as its content) in the existing repo.git you would be using for that test. (Meaning with a repo which existed before trying to reference it as a wildcard repo)