Public | Automated Build

Last pushed: a year ago
Short Description
Gitolite + Gitweb with anonymous http access. Great for local caching git mirror.
Full Description


A docker image to run Gitolite

Gitolite website:
GitWeb website:

Quick start

Clone this project:

git clone
cd docker-gitolite

Make your own GitWeb image

Build your image:

docker build -t dockergitolite_gitolite .

Run your image:

docker run --name dockergitolite_test -p 8080:80 --detach dockergitolite_gitolite

Check running container:

git ls-remote http://localhost:8080/git/testing.git

Stop running container:

docker stop dockergitolite_test

Remove stopped container:

docker rm dockergitolite_test

Docker compose

Compose is a tool for defining and running multi-container Docker applications, using a Compose file to configure
the application services.

Build docker images:

docker-compose build

Create and start docker containers with compose:

docker-compose up -d

Stop docker containers

docker-compose stop

Removed stopped containers:

docker-compose rm

Environment Variables

  • ADMIN_USER: Admin user name. Defaults to admin.
  • ADMIN_PASS: Admin user password. Defaults to password.

Set your own environment variables

Environment variables can be set by adding the --env argument in the command line, for example:

docker run --env ADMIN_USER="administrator" --env ADMIN_PASS="changeme" --name dockergitolite_test -p 8080:80 --detach dockergitolite_gitolite

To clone the default testing repository from the container started before, use the command:

git clone http://localhost:8080/git/testing.git

Note: you may include the ".git" at the end but it is optional.


OpenShift Origin is a distribution of Kubernetes optimized for continuous application development and multi-tenant deployment.

More information:

The OpenShift Gitolite application template is available in openshift

Upload template to OpenShift

Create a new template application in OpenShift (before continue, make sure you are logged in and a new project is created in OpenShift)

oc create -f openshift/gitolite.json

Create application from template

oc new-app gitolite -p ADMIN_USER=admin -p ADMIN_PASS=changeme


Access the GitWeb UI at: http://localhost:8080/git

Push content to the new empty repository:

mkdir testing
cd testing
git init
touch README
git add README
git commit -m "First commit"
git remote add test http://admin:password@localhost:8080/git/testing.git
git push test master


The installation will write logging files in two different locations depending one the application that generates the
log events:

  • httpd: redirected to docker output
  • gitolite: /var/lib/gitolite3/.gitolite/logs/gitolite-<year>-<month>.log

Managing gitolite

The complete documentation about gitolite can be found here

Update configuration

The configuration for gitolite is stored in a git repository named gitolite-admin. All changes that are done to this
configuration is automatically applied after a git push using a post-commit hook. To clone the git repository run the

git clone http://admin:password@

Make gitolite-admin readable by git-daemon until a first commit to ensure you can access gitolite-admin.git repo
after first commit (POST_COMMIT trigger) give read access to 'daemon' user (see

repo gitolite-admin
    RW+     =   admin
    R       =   daemon

Add rule to allow to create "wild" repositories

Add at the beginning of conf/gitolite.conf to following configuration to allow all users that have valid credentials to create a new repository:

repo pub/..*
    C       =   @all
    RW+     =   CREATOR
    RW      =   WRITERS
    R       =   READERS

When trying to clone a respository that doesn't exists yeat,
the configuration above will create a new one and configure as CREATOR the user that made the request:

git clone http://admin:password@

The new repository can be cloned only after the permissions for read have been granted to some user/group:

curl http://admin:password@

See more info here

Gitolite shell commands

Gitolite is providing features that are accessible as shell commands. The command name will come just after the /git/, followed by a ?, followed by the arguments, with + representing a space.

The get a list of all enabled features, call:

curl http://admin:password@

To get information about a specific command, call:

curl http://admin:password@

See more info here

Docker Pull Command
Source Repository