-
-
Notifications
You must be signed in to change notification settings - Fork 30
Installation
The simplest way is to install the pre-built binaries which are available for various platforms. You can download the latest release from the Releases page.
Apart from the pre-built binaries, the most preferred choice would be to use docker images which are available on GitHub package registry and can be found here: https://github.com/AkashRajpurohit/git-sync/pkgs/container/git-sync
docker run \
--name=git-sync \
-e PUID=1000 \
-e PGID=1000 \
-v ~/.config/git-sync/config.yaml:/git-sync/config.yaml \
-v ~/git-backups:/backups \
ghcr.io/akashrajpurohit/git-sync:latest
Or you can use the docker-compose.yml
file to run the container.
services:
git-sync:
image: ghcr.io/akashrajpurohit/git-sync:latest
volumes:
- ~/.config/git-sync/config.yaml:/git-sync/config.yaml
- ~/git-backups:/backups
environment:
- PUID=1000
- PGID=1000
restart: unless-stopped
docker-compose up -d
For finding the PGID
and PUID
values, you can use $(id -g)
and $(id -u)
. Most likely it will be 1000
.
Note
If you are using docker, then it is best to use the inbuilt cron functionality and keep the service running in background and syncing up your repositories periodically.
This means that you need to add cron
option in your config.yaml file
Here is how your config file should look like for docker so that you can periodically keep syncing your repositories.
go get github.com/AkashRajpurohit/git-sync
git clone https://github.com/AkashRajpurohit/git-sync.git
cd git-sync
go install
go build