explaingit

sitaramc/gitolite

8,575PerlAudience · ops devopsComplexity · 3/5LicenseSetup · moderate

TLDR

Gitolite lets you run your own Git server on a Linux machine and control who can access which repositories through a simple text config file, no web interface, all managed via SSH and a push to an admin repository.

Mindmap

mindmap
  root((repo))
    What It Does
      Host Git repos
      Control SSH access
      Manage permissions
    Access Control
      Per-user rules
      Per-branch rules
      User groups
    How It Works
      Admin git repo
      Push config changes
      SSH key management
    Audience
      Self-hosters
      DevOps teams
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Host private Git repositories on your own Linux server with fine-grained per-user and per-branch access rules

USE CASE 2

Give team members read-only access to some repos and push access to others without touching the server directly after initial setup

USE CASE 3

Restrict who can push to the main branch while allowing all developers to push to feature branches

USE CASE 4

Add a new user or repository to the server by editing a config file and pushing it, no SSH login to the server required

Tech stack

PerlGitSSH

Getting it running

Difficulty · moderate Time to first run · 1h+

Requires a Linux server with SSH access and a dedicated user account, no web UI, all management is done via git push.

Free to use and modify, but any modified versions you distribute must also be released as open source under the same GPL v2 license.

In plain English

Gitolite is a tool for running your own Git hosting server. You install it on a Linux or Unix machine under a dedicated user account (typically called "git"), and it lets you host multiple Git repositories there while controlling who can access what through a simple configuration file. The main idea is that access control is managed by editing a special repository called gitolite-admin and pushing changes to the server. No direct file editing on the server is needed after initial setup. To add a new user, you add their SSH public key to a keydir folder in that admin repository. To create a new repository and set permissions, you edit a config file that looks like a short list of rules. Permissions are expressed as simple lines. You can grant read-only access, allow pushing to branches, or give full access including the ability to delete branches and rewrite history. Rules can target specific branch or tag name patterns, so you can say, for example, that one person can push to any branch but not to master. You can also define groups of users and apply rules to a whole group at once. Users connect over SSH. They can run a handful of remote commands, such as listing the repositories they have access to by running a simple ssh command to the server. No web interface is included. This is a command-line and SSH-based tool. The README on GitHub is intentionally minimal and covers only basic installation and first use. Full documentation including advanced features, HTTP-based hosting, migration from older versions, and troubleshooting lives at gitolite.com/gitolite. The software is licensed under GPL v2.

Copy-paste prompts

Prompt 1
Walk me through installing Gitolite on a fresh Ubuntu server under a dedicated 'git' user account from start to first push
Prompt 2
Write a gitolite.conf file that gives a dev team read-only access to a shared library repo and full push access to their own project repos
Prompt 3
How do I add a new user's SSH public key to Gitolite and give them write access to a specific repository?
Prompt 4
Show me a Gitolite config that allows a CI bot to read all repositories but prevents it from pushing to any branch
Prompt 5
Write the Gitolite permission rules to protect the main branch so only a release manager can push to it while developers push to feature branches
Open on GitHub → Explain another repo

← sitaramc on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.