Syncing Git Repositories

The IPFire Git Server is able to sync repositories with other sources. This is very helpful when developers what to publish code on platforms like GitHub as well as the IPFire Git servers or what to push to somewhere else and mirror on the IPFire Git servers.

Syncing from a remote repository

To regularly pull from a remote repository, create a clone of your Git repository in your usual home directory and create a "remote" called "pull":

git remote add pull

Syncing to a remote repository

Add a remote to your repository called "push":

git remote add push

The synchronisation runs in mirror mode and will wipe all branches, tags and other remote content that does not exist on the local Git server.

SSH Authentication

If you need to authenticate to push or pull your repository, you can create an SSH key and put it into your home at ~/.ssh/git-sync and it will be used for all your repositories.

You can create the key for example with the following command:

ssh-keygen -t ed25519 -f ~/.ssh/git-sync
Edit Page ‐ Yes, you can edit!

Older Revisions • August 14, 2019 at 9:44 am • Michael Tremer