| Crates.io | git-sync |
| lib.rs | git-sync |
| version | 0.1.0 |
| created_at | 2025-04-22 17:50:09.869383+00 |
| updated_at | 2025-05-22 17:51:25.868893+00 |
| description | Simple tool to create and maintain a backup sync of your own repo |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1644407 |
| size | 21,699 |
This repository hosts a Docker application designed to automate the mirroring of Git repositories. It's particularly useful for backing up repositories or ensuring that a synchronous copy of a repository is consistently available.
git clone https://github.com/devmaxde/git-sync.git
cd git-sync
config.toml file inside the docker-config directory. A Example config can look like this:timeout = 120
[[repos]]
ident = "my_project"
source_url = "git@github.com:devmaxde/git-sync.git"
target_url = "git@github.com:devmaxde/TestREPO.git"
Set up SSH keys and known hosts: Place your SSH private key, public key, and known_hosts file in a config directory. Direct access is not recommended. You should also set the ssh-keys to read-only.
Use Docker Compose to run the application:
Update the docker-compose.yml file as follows and then start the service:
services:
mirror:
build: .
networks:
- internet
volumes:
- "./docker-config/config.toml:/root/config.toml:ro"
- "./docker-config/github:/root/.ssh/id_rsa:ro"
- "./docker-config/github.pub:/root/.ssh/id_rsa.pub:ro"
- "./docker-config/known_hosts:/root/.ssh/known_hosts:ro"
networks:
internet:
Run the Docker Compose command:
docker-compose up -d
Contributions are welcome! Please fork the repository and submit pull requests with your proposed changes.