You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Reid 'arrdem' McKenzie 7d6a3dc89c
Expound on the token a bit
5 years ago
examples Expound on the token a bit 5 years ago
.gitignore set minimum python version, add badges to readme 5 years ago
LICENSE.txt Bismillah 5 years ago Update README with a usage section 5 years ago Enable setting the log level at the CLI 5 years ago Strip for good measure 5 years ago


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.


Giternity is packaged via PyPi, the Python Package Index. Required packages:

  • Python 3
  • Python 3 pip (if your distro packages it separately)
  • git
sudo pip3 install giternity


$ giternity --help
usage: [-h] [--version] [--dry-run] [-c CONFIG_FILE]
                    [--log-level [LOG_LEVEL]]

Mirror git repositories and retrieve metadata for cgit.

optional arguments:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  --dry-run             show a plan for archiving repositories and exit
                        configuration file for
  --log-level [LOG_LEVEL]
                        Set the logging output level. ['CRITICAL', 'ERROR',
                        'WARNING', 'INFO', 'DEBUG']



The configuration file by default is located at /etc/giternity.toml. See the example giternity.toml for a list of all options.

With the configuration in place you simply run giternity, or giternity -c $YOUR_CONFIG_FILE if you want to place it somewhere else.


Giternity is intended for use as an unsupervised cron. See the example giternity.cron for a possible /etc/cron.d/giternity.

Note that it is recommended to run Giternity as an unprivileged or "sandbox" user if possible. For example one could have a git-data group which owns the /srv/git data directory. http (for cgit), git (for gitosis, gitolite or just bare git-shell) and giternity could all be group members.


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

# the giternity git_data_path as you configured it
# giternity writes this file to track the last-modified date of mirroed repos
# infer section (github user / group) from the first repo path segment