{"id":22865494,"url":"https://github.com/taoky/gitkeeper","last_synced_at":"2025-05-05T15:19:03.695Z","repository":{"id":234956790,"uuid":"789744754","full_name":"taoky/gitkeeper","owner":"taoky","description":"Works like etckeeper, but tracks git repos specified instead of just /etc.","archived":false,"fork":false,"pushed_at":"2025-03-18T11:27:32.000Z","size":152,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-05T15:18:53.127Z","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":null,"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":null,"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}},"created_at":"2024-04-21T12:49:42.000Z","updated_at":"2025-03-18T11:27:35.000Z","dependencies_parsed_at":"2024-04-21T20:51:32.968Z","dependency_job_id":"dbac212d-e792-4615-abc1-f01f4f9c4aaf","html_url":"https://github.com/taoky/gitkeeper","commit_stats":null,"previous_names":["taoky/gitkeeper"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taoky%2Fgitkeeper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taoky%2Fgitkeeper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taoky%2Fgitkeeper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taoky%2Fgitkeeper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taoky","download_url":"https://codeload.github.com/taoky/gitkeeper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252522175,"owners_count":21761685,"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","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":"2024-12-13T11:37:25.510Z","updated_at":"2025-05-05T15:19:03.680Z","avatar_url":"https://github.com/taoky.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gitkeeper\n\nWorks like etckeeper, but tracks git repos specified instead of just `/etc`.\n\nNo third-party dependencies required. Python \u003e= 3.8 (as the one for Ubuntu 20.04). It's expected for this script to run in supported Ubuntu LTS and Debian (5 years, ESM and ELTS excluded).\n\n## Install\n\n```shell\nsudo wget https://github.com/taoky/gitkeeper/raw/master/gitkeeper -O /usr/local/bin/gitkeeper\nsudo chmod +x /usr/local/bin/gitkeeper\n```\n\nAnd then create `/etc/gitkeeper.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/gitkeeper/raw/master/completions/gitkeeper.completion.bash -O /etc/bash_completion.d/gitkeeper\n```\n\n## Help\n\n```console\n$ gitkeeper 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=\"gitkeeper vcs .\"` and enjoy `gitkp` same as how you use `git` before.\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/gitkeeper.conf`\n\n```ini\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 gitkeeper 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### `~/.gitkeeper.conf`\n\n```ini\n[user]\nemail = me@example.com\nname = example\n```\n\nGitkeeper would ask your email if the file does not exist, and use username as name. You could override them in the config file. If `~/.gitkeeper.conf` does not exist, gitkeeper 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 gitkeeper, 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\nGitkeeper 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%2Fgitkeeper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaoky%2Fgitkeeper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaoky%2Fgitkeeper/lists"}