{"id":27392211,"url":"https://github.com/samt/node-gitolite","last_synced_at":"2026-03-08T17:39:11.606Z","repository":{"id":15350919,"uuid":"18081712","full_name":"samt/node-gitolite","owner":"samt","description":"Node.js interface to a gitolite backend system","archived":false,"fork":false,"pushed_at":"2014-08-16T05:04:13.000Z","size":192,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T21:18:15.322Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samt.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-24T22:51:27.000Z","updated_at":"2023-08-08T10:45:39.000Z","dependencies_parsed_at":"2022-09-05T17:10:33.721Z","dependency_job_id":null,"html_url":"https://github.com/samt/node-gitolite","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samt%2Fnode-gitolite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samt%2Fnode-gitolite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samt%2Fnode-gitolite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samt%2Fnode-gitolite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samt","download_url":"https://codeload.github.com/samt/node-gitolite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248782256,"owners_count":21160717,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-13T21:18:17.731Z","updated_at":"2026-03-08T17:39:11.577Z","avatar_url":"https://github.com/samt.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gitolite [![Build Status](https://secure.travis-ci.org/samt/node-gitolite.png)](http://travis-ci.org/samt/node-gitolite)\n\nThis is a Work-in-progress.\n\nNode.js interface to a gitolite backend system, inspired by the ruby gem [gitolite](https://github.com/wingrunr21/gitolite)\n\nThis works by maintaining interal data structures to represent the gitoltie\nadmin repository. It does not require you to relinquish external control over\nthe repository as it will rebuild the data structures based upon the current\nstate of the repository, the configuration files, and the user keys.\n\n## Features\n\n* Creation and management of Repositories, Users, Keys, and Groups\n* Fine control over permissions\n* Manage repo-level configuration\n* Custom commit messages to admin repo\n\n## Requirements\n\n* Working [gitolite](http://gitolite.com/) installation\n* Node version 0.4.1 or newer\n\n## Installation\n\n    npm install gitolite\n\n## Usage\n\n### Get the admin repo object\n\n```javascript\nvar gitolite = require('gitolite');\ngitolite('/path/to/gitolite/repo', function (err, admin) {\n  if (err) throw err;\n  // manage here\n});\n\n// Dump internal data structures and reload the repo\n// This will call `git fetch origin master \u0026\u0026 git merge --no-commit origin/master`\nadmin.reload(function (err, admin) {\n  if (err) throw err;\n  // manage here\n});\n```\n\n### User/Key management\n\n```javascript\n// Basic user addition with keys\nvar bobsLaptopSSHkey = 'ssh-rsa AAAAB3Nz...cPel5ufw== Bob@TAHOE';\nvar bobsDesktopSSHkey = 'ssh-rsa AAS1i5aV...Fg90SKJ4== Bob@NATOMA'\nvar bobsSSHkey = 'ssh-rsa AAAA53bd...uV36sBsm== Bob@SHASTA';\n\nadmin.addUser('bob');\nvar bob = admin.users['bob'];\nbob.addKey('laptop', bobsLaptopSSHkey);   // creates 'keydir/laptop/bob.pub'\nbob.addKey('desktop', bobsDesktopSSHkey);\nbob.removeKey('laptop');\n\n// Fluent interface\nvar alicesMacbookSSHkey = 'ssh-rsa AAAA7b4p...5iK2kFSD== Alice@OAKLAND';\nvar alice = admin.addUser('alice');\nalice.addKey('macbook', alicesMacbookSSHkey) // creates keydir/macbook/alice.pub\n  .addKey('ubuntu', alicesUbuntuSSHkey)      // creates keydir/ubuntu/alice.pub\n  .addKey('ubuntulaptop', alicesUbuntuLaptopSSHkey);\n\n// View all keys a given user has\nfor (var label in alice.keys)\n  console.log(label + ' =\u003e ' + alice.keys[label]); // macbook =\u003e ssh-rsa AAAA7b4p...5iK2kFSD== Alice@OAKLAND;\n\n// Delete user\nadmin.removeUser('alice');\n\n// Please note that users who are created but who are not given SSH keys\n// will NOT be added to the admin repository. This is a limitation of\n// gitolite itself.\nvar carol = admin.addUser('carol');\nadmin.commit(function (err, admin) {\n  admin.users['carol'] // does not exist\n});\n```\n\n### Group management\n\n```javascript\nadmin.addGroup('@admins', [ 'alice', 'bob' ]);\nvar adminGroup = admin.groups['@admins'];\nadminGroup.add('dave');\nadminGroup.remove('bob');\nconsole.log(adminGroup.users.join(', ')); // alice, dave\n\n// get group object from 'addGroup()'\nvar devs = admin.addGroup('@devs', [ 'ryan', 'sally', 'thomas' ]);\nconsole.log(devs.users.join(', ')); // alice, dave\n```\n\n### Repo management\n\n```javascript\nvar fooRepo = admin.addRepo('foo');\n\n// Delete the repo\nadmin.removeRepo('bar');\n```\n\n### User/Group permissions\n\n```javascript\nvar fooRepo = admin.repos['foo'];\nfooRepo.addPermission('@admins', 'RW+');\nfooRepo.addPermission('john', 'RW+');\nfooRepo.addPermission('john', 'R', 'development');\nfooRepo.addPermission('jane', '-');\n\n// removes permission, DOES NOT deny access\nfooRepo.removePermission('jane'); // partial match of line\n```\n\n### Repo configuration\n\n```javascript\nvar fooRepo = admin.repos['foo'];\nfooRepo.addConfig('hook.foo', './runfoobar.sh');\nfooRepo.removeConfig('hook.bar');\nvar hookFoobarValue = fooRepo.configs['hook.foo'];\n\n// commit changes to repo and push\nadmin.commit(function (err, admin) {\n  if (err) throw err;\n  console.log('admin repo updated');\n});\n```\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2014 Sam Thompson \u003ccontact@samt.us\u003e\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamt%2Fnode-gitolite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamt%2Fnode-gitolite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamt%2Fnode-gitolite/lists"}