Skip to main content

Mirror git repositories and retrieve metadata for cgit.

Project description


Version pyversions Downloads License

Giternity is a tool to mirror git repositories from GitHub. You can specify a username/organization to mirror all their repositories, or just individual repos. It retrieves some repo metadata so they can be nicely served with cgit. Run giternity periodically to update the mirrors.

An example result is Follow the tutorial to host your own.


Install giternity:

sudo pip3 install giternity

You also need to have git installed.


The configuration file is at /etc/giternity.toml:

# path for the git mirrors
git_data_path = "/srv/git/"

# path for checkouts of the git mirrors (optional)
# checkout_path = "/srv/git_checkout/"

# public URL of your cgit instance (optional)
# cgit_url = ""

repositories = [

Set git_data_path to the path where you want to store the git repositories. It will contain bare git repositories: the data you usually see in the .git directory in your projects. To also have the actual working files of the repos, set checkout_path to where to keep them. If you’ll be hosting the repos with cgit, set cgit_url to the public URL.

In the [github] section you specify which repositories to mirror. You list a username ("rahiel") or an organization ("sunsistemo") to mirror all of their non-fork repositories. For individual repos ("TeMPOraL/nyan-mode") you specify them like owner/repo.

With the configuration in place you simply run giternity.

For convenience there is an automatic configuration that sets up a separate system user, gives this user permissions to git_data_path (and to checkout_path if specified) and creates a cron job at /etc/cron.d/giternity to update the mirrors every hour. Apply these defaults with:

sudo giternity --configure


Your git mirrors are now suitable to serve with cgit. Customize your /etc/cgitrc as you like and add the following to the bottom:


where you replace /srv/git/ with the git_data_path from your /etc/giternity.toml.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

giternity-0.5.tar.gz (5.8 kB view hashes)

Uploaded source

Built Distribution

giternity-0.5-py3-none-any.whl (18.0 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page