https://github.com/realorangeone/git-mirror
Simple application to mirror repos between places
https://github.com/realorangeone/git-mirror
git mirror
Last synced: 4 months ago
JSON representation
Simple application to mirror repos between places
- Host: GitHub
- URL: https://github.com/realorangeone/git-mirror
- Owner: RealOrangeOne
- License: bsd-3-clause
- Created: 2020-06-23T18:06:24.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-04-25T06:01:48.000Z (about 2 years ago)
- Last Synced: 2025-07-06T01:02:35.673Z (11 months ago)
- Topics: git, mirror
- Language: Python
- Homepage: https://hub.docker.com/r/theorangeone/git-mirror
- Size: 60.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Git Mirror
Mirror git repositories between services.
## Usage
Configuration is done using a `repositories.toml` file:
```toml
[[repository]]
source = "https://$GITHUB_TOKEN@github.com/RealOrangeOne/git-mirror"
destination = "https://$GITHUB_TOKEN@github.com/RealOrangeOne-backup/git-mirror"
```
Environment variables are automatically injected into the `source` and `destination` values.
Now, simply run the script. For efficiency, these clones are stored so that only changes need to be cloned and pushed going forwards. `git gc` is automatically run to keep directory sizes down.
To just run the mirror once, run using `--once`.
### Additional settings
`heartbeat`: A HTTP URL to poll to ensure the process is still running. The interval is the smallest interval of all the repositories. Works nicely with [healthchecks.io](https://healthchecks.io/).
`clone_root`: Directory to store repositories in. Defaults to `$PWD/repositories/`.
`interval`: How often repositories are checked (in seconds). Defaults to 15 minutes.