Mirror tea is a small tool to automatically mirror all git repositories to a gitea instance.
Currently, it only supports mirroring from GitHub to gitea.
PRs are welcome.
The configuration consists of two parts: the sources and the targets.
Sources are the places where the repositories are mirrored from.
Properties
The type of the source. Currently only "Github" is supported.
The token to authenticate with the source.
The targets where the repositories should be mirrored to.
The organization to mirror. If not set, all repositories of the user are mirrored.
Targets are the places where the repositories are mirrored to.
Properties
The type of the target. Currently only "Gitea" is supported.
The url of the target.
Mirror issues.
Mirror labels.
Mirror milestones.
The interval in which the repositories are mirrored.
Should the repository be private.
Mirror pull requests.
Mirror releases.
Mirror wiki.
Authentication information for the target. Only username and password are supported.
Example
watcher_interval_ms: 30000
targets:
gitea_local:
type: Gitea
url: https://your.gitea.instance/api/v1
issues: true
labels: true
milestones: true
mirror_interval: 8h0m0s
private: true
pull_requests: true
releases: true
wiki: true
auth:
username: your_username
password: your_password
sources:
github_personal:
type: Github
token: your_github_token
targets:
- gitea_local
Run the application once and exit.
Generate a config.yml file in the current directory.
Path to the config.yml file.
Provide the config as a json string.
Print the help message.
https://hub.docker.com/r/0xc9c3/mirror-tea
version: '3'
services:
mirror:
image: 0xc9c3/mirror-tea
container_name: mirror
restart: unless-stopped
volumes:
- ./config.yml:/config.yml
command: -c /config.yml
Build the application using cargo:
cargo build --release
Run the application:
./target/release/mirror-tea -c config.yml
You also have the option to use i.e. cron to run the application periodically using the "once" parameter.
0 0 * * * /path/to/mirror-tea -o -c /path/to/config.yml