Sign inSign up

haffmans/git-mirror

By haffmans

Updated almost 8 years ago

A simple image to help mirroring a git local repository to a remote host.

Image
0

494

haffmans/git-mirror repository overview

Sources: https://git.simply-life.net/docker/git-mirror

Usage

To mirror a local repository to a server:

docker run -e GITMIRROR_DEPLOY_KEY=<deploy key contents> -v /path/to/git/repository:/git:ro haffmans/git-mirror git-mirror /git [email protected]:my/repository

Note the command 'git-mirror'; this is required.

This is set up to be used from GitLab (CE), to allow mirroring to external servers on push. This will feed commands as a script, making it impossible to pass the required parameters directly.

Customization:

You can customize the pre-set known hosts using ssh-keyscan:

ssh-keyscan git.example.com >> ssh/known_hosts

This default version supports GitHub and GitLab.com services.

Tag summary

Content type

Image

Digest

Size

13.5 MB

Last updated

almost 8 years ago

docker pull haffmans/git-mirror