Parse simple gitolite configs.
- Users
- Groups
- Repositories and permissions
- @all
- Including another config file
- Rule accumulation
Group[s] consist of of other Group[s] and User[s].
$config = new VisualAppeal\Gitolite\Config($pathToConfig);
var_dump($config->getGroups());
var_dump($config->getRepositories());
$config = new VisualAppeal\Gitolite\Config($pathToConfig);
// Make changes
// ...
$config->saveAs($pathToNewOrOldConfig);
$config->commitAndPush();
$config->getGroups()['admins']->addUser('tom', [
'keys' => [
'/absolute/path/to/public/key.pub' => 'relative/path/in/keydir.pub'
],
]);