Wild repositories in gitolite are a very convenient way of managing lots of small repositories with the same permissions. Users with the
C permission can easily create a repository by cloning one that matches the defined repository-regex.
To delete a wild repository multiple steps are required (details below):
- Per server: Activate the gitolite command
- Per repository: Unlock the repo for deletion
- Per repository: Delete the gitolite repo
Activate the gitolite
For the first time you need to make sure that the gitolite
D command is activated on the server (which is not the case by default).
ssh gitUser@myserver nano ~/.gitolite.rc
Uncomment the D command in the
ENABLE block to activate it.
Unlock the gitolite repo for deletion
Check the -D usage using
ssh gitUser@gitServer D -h and use the suggested commands:
ssh gitUser@gitServer D unlock myRepo
Delete the gitolite repo
Decide if you want to delete it immediately (rm) or retain recovery options for some time (trash).
ssh gitUser@gitServer D trash myRepo
ssh gitUser@gitServer D rm myRepo
Using these steps you can easily create unused or old gitolite repos on the server.