Addsy
Addsy

Reputation: 4054

What is the easiest (and neatest) way to manage lots of repositories using gitosis?

I am using gitosis to manage a bunch of private repositories. Everything works great and I have no issues with how we add repositories as such. The problem is that we have relatively few developers but lots of repositories, particularly since one of our projects uses git submodules quite heavily.

This means that the gitosis.conf is starting to get a bit unwieldy and I was wondering if there is any way to tidy it up. At the moment we use something like:

[group developers]
writable = repo1 repo2 repo3 (...) repo20 repo21 repo22
members = dev1 dev2

And when we want another repo we add it to the end of the writable list. The problem is that already this list is getting hard to read and we don't even have all our projects in yet. I know this is real nit-picking in what is otherwise an excellent setup but I was just wondering if anyone has any handy hints or tips to share on better ways to organise the gitosis.conf

Cheers

Upvotes: 2

Views: 276

Answers (4)

Seth Robertson
Seth Robertson

Reputation: 31451

gitosis is no longer maintained and supported by the author; most people usually recommend gitolite instead which has much better documentation and more features.

As long as I am advertising, I might as well advertise gitslave as a simplier alternative to git-submodules for people where all of the repositories are locally developed and there doesn't need to be a tight binding (except for tags) between which revision the master and slave repositories are at. It is better for some workflows, worse for others.

Upvotes: 0

Tobu
Tobu

Reputation: 25426

You can use multiple lines like this:

[group developers]
writable:
 repo1
 repo2
 repo3
 (...)
 repo20
 repo21
 repo22

members:
 dev1
 dev2

To display the history before using one item per line, you can use git log -p --color-words.

Upvotes: 2

rafalotufo
rafalotufo

Reputation: 3932

Another solution would be to create your own conf file with the syntax you find more convenient, and create a script to transform that into the gitosis.conf file.

Then you could use wildcards and regex to match repository names, such as:

repo-* or repo-[\d]+ to match repo-1, repo-2 etc.

Upvotes: 1

rafalotufo
rafalotufo

Reputation: 3932

gitosis.conf enables the creation of developer groups, and then assign them repositories. The other way around would be configure repositories and for each assign them developers.

I don't think that either of these solutions would be better in this case. It seems to be a hard task. So I would ask: is it really important that some developers have access to one site, and not to another? If not, then just create a one group, and list all sites :)

Upvotes: 0

Related Questions