a small tool to sync a git repository to a mirrored location
- a current node installation (>=v10) (https://nodejs.org/en/)
- yarn (https://yarnpkg.com/lang/en/docs/install)
- git client (https://git-scm.com/downloads)
- registered ssh key with read permissions on source repository
- registered ssh key with push permissions on target repository
- install dependencies with
yarn install
- configure repositories to sync in
./config.json
- start sync process with the command
yarn start
onlyRunOnce
(true
), makes sure that the program doesn't schedule further updates, so theinterval
setting is ignored. If you are running this program as a scheduled job make sure to set this flag totrue
cleanRepoOnRun
(false
), flag to indicate if the cloned repository directory should cleaned before every runsyncIntervalSeconds
(60
), interval in seconds in which the source repository should get pulled and updates should be pushed to the target. Ignored ifonlyRunOnce
is set totrue