This script simply sync git repo from source to target
It works only with ssh@git
https:// not supported now
It uses id_ed25519 SSH keys from .ssh folder to run on server with crontab
Script works only with git@ssh url, https:// doesn't work
Install requirements and add SSH keys:
./install.sh
Manually run:
./sync.sh git@source git@target
Run with config (don't forget to edit config.conf for your needs, check example):
./sync.sh -c
Config example:
sourceRepo1 targetRepo1
sourceRepo1 targetRepo2
sourceRepo3 targetRepo3
You set source git repo space target git repo
crontab -e* */6 * * * /bin/bash /var/git/simple-git-mirror-sync/sync.sh -c >/dev/null 2>&1/bin/bash- path tobashon your server, you can check it withwhich bashon your server/var/git/simple-git-mirror-sync/sync.sh- full path to this script