{"id":34799716,"url":"https://github.com/taoky/git-keeper","last_synced_at":"2025-12-25T11:11:32.775Z","repository":{"id":234956790,"uuid":"789744754","full_name":"taoky/git-keeper","owner":"taoky","description":"Tracks specified git repos for sysadmins","archived":false,"fork":false,"pushed_at":"2025-10-24T14:03:46.000Z","size":120,"stargazers_count":7,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-22T13:37:29.386Z","etag":null,"topics":["gitops"],"latest_commit_sha":null,"homepage":"","language":"Python","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/taoky.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-04-21T12:49:42.000Z","updated_at":"2025-12-12T22:40:41.000Z","dependencies_parsed_at":"2024-04-21T20:51:32.968Z","dependency_job_id":"dbac212d-e792-4615-abc1-f01f4f9c4aaf","html_url":"https://github.com/taoky/git-keeper","commit_stats":null,"previous_names":["taoky/gitkeeper","taoky/git-keeper"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/taoky/git-keeper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taoky%2Fgit-keeper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taoky%2Fgit-keeper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taoky%2Fgit-keeper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taoky%2Fgit-keeper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taoky","download_url":"https://codeload.github.com/taoky/git-keeper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taoky%2Fgit-keeper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28027746,"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","status":"online","status_checked_at":"2025-12-25T02:00:05.988Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["gitops"],"created_at":"2025-12-25T11:11:31.447Z","updated_at":"2025-12-25T11:11:32.768Z","avatar_url":"https://github.com/taoky.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git-keeper\n\nWorks like etckeeper, but tracks git repos specified instead of just `/etc`.\n\nNo third-party dependencies required. Python \u003e= 3.9 (as the one for Debian 11). It's expected for this script to run in supported Ubuntu LTS and Debian (5 years, ESM and ELTS excluded).\n\nAs `gitkeeper` conflicts with `mrb`, it's renamed to `git-keeper` now.\n\nAvailable in [GitHub](https://github.com/taoky/git-keeper) and [Debian GitLab (Salsa)](https://salsa.debian.org/taoky/git-keeper).\n\n## Install\n\n### Debian install\n\nYou could download the `.deb` file from [Releases](https://github.com/taoky/git-keeper/releases/tag/rolling) page. And then install it with `apt` -- it has very minimal dependencies so it should install smoothly.\n\nNote that it's recommended to remove `/usr/local/bin/gitkeeper` or `/usr/local/bin/git-keeper` if you have installed it manually before.\n\n### Single file install\n\n```shell\nsudo wget https://github.com/taoky/git-keeper/raw/master/git-keeper -O /usr/local/bin/git-keeper\nsudo chmod +x /usr/local/bin/git-keeper\nsudo ln -s /usr/local/bin/git-keeper /usr/local/bin/git-kp\n```\n\nAnd then create `/etc/git-keeper.conf` with repos you need to track.\n\nIf you're using bash, you could download the completion script:\n\n```shell\nsudo wget https://github.com/taoky/git-keeper/raw/master/completions/git-keeper.completion.bash -O /etc/bash_completion.d/git-keeper\n```\n\nIf you want to add motd, add following files:\n\n```shell\nsudo wget https://github.com/taoky/git-keeper/raw/master/motd/99-git-keeper -O /etc/update-motd.d/99-git-keeper\nsudo chmod +x /etc/update-motd.d/99-git-keeper\nsudo wget https://github.com/taoky/git-keeper/raw/master/motd/git-keeper-motd.service -O /etc/systemd/system/git-keeper-motd.service\nsudo wget https://github.com/taoky/git-keeper/raw/master/motd/git-keeper-motd.timer -O /etc/systemd/system/git-keeper-motd.timer\nsudo mkdir -p /etc/git-keeper.d\nsudo wget https://github.com/taoky/git-keeper/raw/master/motd/motd-clean.tmpl -O /etc/git-keeper.d/motd-clean.tmpl\nsudo wget https://github.com/taoky/git-keeper/raw/master/motd/motd-dirty.tmpl -O /etc/git-keeper.d/motd-dirty.tmpl\nsudo systemctl enable --now git-keeper-motd.timer\n```\n\n## Help\n\n```console\n$ git-keeper help\nusage: Track git repos [-h] [--config CONFIG] [--parallel PARALLEL] {status,commit,update,vcs,ls,diff,help} ...\n\npositional arguments:\n  {status,commit,update,vcs,ls,diff,help}\n    status              Show status of repo(s)\n    commit              Add all and commit changes in repo(s) on behalf of current user\n    update              Push/pull repo(s) with remote\n    vcs                 Run a git command on repo(s)\n    ls                  Just list all repos\n    diff                Show changes in given repo\n    help                Show help\n\noptions:\n  -h, --help            show this help message and exit\n  --config CONFIG, -c CONFIG\n                        Path to config file\n  --parallel PARALLEL, -p PARALLEL\n                        Threads to use for status and update commands\n```\n\n`PARALLEL` defaults to 8.\n\nA special name, `.`, could be used to represent the current directory repo if it exists in config file. This means that you could set `alias gitkp=\"git-keeper vcs .\"` and enjoy `gitkp` same as how you use `git` before. Also, you could put a symlink named `gitkp` to `/usr/local/bin` pointing to `git-keeper`, and then use `gitkp` directly.\n\n## Example\n\n![Screenshot](assets/example.png)\n\n## Finding all git repos\n\n```bash\nsudo find / -name .git -type d -xdev 2\u003e/dev/null\n```\n\n## Config example\n\n### `/etc/git-keeper.conf`\n\n```ini\n[.config]\n# .config is a special case that used to configure git-keeper itself\nmotd-template-dirty = /etc/git-keeper.d/motd-dirty.tmpl\nmotd-template-clean = /etc/git-keeper.d/motd-clean.tmpl\n\n[rsyncd]\npath = /etc/rsyncd\n\n[systemd-network]\npath = /etc/systemd/network\n\n[repos]\npath = /home/mirror/repos\nuser = mirror\n```\n\nBy default git-keeper would try to get the owner of specified folder and use it as the user to run git. You can specify a user in the config file to override this.\n\n### `~/.git-keeper.conf`\n\n```ini\n[user]\nemail = me@example.com\nname = example\n```\n\ngit-keeper would ask your email if the file does not exist, and use username as name. You could override them in the config file. If `~/.git-keeper.conf` does not exist, git-keeper would try reading `~/.gitconfig` to see if `user.email` is set, and use it and `user.name` (or username).\n\nNote that if you use `sudo` to run git-keeper, it would still use the config file in the home directory of the user (instead of root) who runs it.\n\n## Practice of SSH deploy key\n\ngit-keeper would not try to push repositories when it has a HTTP(S) remote (as you need to type in password/code in most cases). So you might what to use SSH deploy key.\n\nHowever, GitHub does not support to use a same deploy key for multiple repositories. In this case you can create a deploy key for each repository:\n\n1. Create a SSH key pair inside the `.git` directory of the repository.\n\n    ```bash\n    cd .git\n    # RSA key pair\n    ssh-keygen -f ./id_rsa -t rsa -b 4096 -N \"\"\n    # or ED25519 key pair\n    ssh-keygen -f ./id_ed25519 -t ed25519 -N \"\"\n    ```\n\n2. Update `.git/config` like this:\n\n    ```ini\n    [core]\n        # ...\n        # RSA key pair\n        sshCommand = ssh -i .git/id_rsa\n        # or ED25519 key pair\n        sshCommand = ssh -i .git/id_ed25519\n    ```\n\n3. Add public key (`id_rsa.pub` or `id_ed25519.pub`) to the repository's deploy keys.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaoky%2Fgit-keeper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaoky%2Fgit-keeper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaoky%2Fgit-keeper/lists"}