https://github.com/ditschedev/kagami
A simple cli tool to mirror git repositories
https://github.com/ditschedev/kagami
cli git mirror mirroring
Last synced: 3 months ago
JSON representation
A simple cli tool to mirror git repositories
- Host: GitHub
- URL: https://github.com/ditschedev/kagami
- Owner: ditschedev
- Created: 2024-05-15T08:40:29.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-21T12:11:26.000Z (about 1 year ago)
- Last Synced: 2025-03-22T21:01:51.026Z (3 months ago)
- Topics: cli, git, mirror, mirroring
- Language: Go
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# kagami
[//]: # ([](https://github.com/ditschedev/swag-ts/actions?query=workflow%3ATest))
[](https://goreportcard.com/report/github.com/ditschedev/kagami)Kagami is a simple CLI tool for mirroring git repositories from one provider to another.
It is versatile and easy to use.## Installation
```bash
go install github.com/ditschedev/kagami@latest
```## Configuration
The configuration is done using a yaml file. The file should contain a list of repositories
that should be mirrored. Here is an example configuration file:```yaml
repositories:
- name: my-repo
remote_uri: "[email protected]:ditschedev/kagami.git"
mirror_uri: "[email protected]:ditschedev/kagami.git"
```The configuration file can be passed to the CLI using the `-c` flag.
### Authentication
Currently only SSH authentication is supported.
Make sure you have the correct SSH keys set up for the repositories you want to mirror and have
your ssh agent up and running.## Cron
Kagami can be used in a cron job to mirror repositories periodically.
Simply provide a path to the configuration file and add an entry to your crontab.```bash
crontab -e
```Add the following line to make kagami run every 5 minutes:
```bash
*/5 * * * * kagami mirror -c /path/to/repositories.yml
```