/gitlab-mirrors

A set of scripts adding the ability of managing remote mirrors to GitLab.

Primary LanguageShellMIT LicenseMIT

gitlab-mirrors

The gitlab-mirrors project is designed to fill in a feature which is currently missing from GitLab: the ability to mirror remote repositories. gitlab-mirrors creates read only copies of remote repositories in gitlab. It provides a CLI management interface for managing the mirrored repositories (e.g. add, delete, update) so that an admin may regularly update all mirrors using crontab. It operates by interacting with the GitLab API using python-gitlab.

Features

  • Mirror git and SVN repositories.
  • When adding a mirror if the project doesn't exist in GitLab it will be auto-created.
    • Set project creation defaults (e.g. issues enabled, wiki enabled, etc.)
  • Update a single mirror.
  • Update all known mirrors.
  • List all known mirrors.

Three easy steps

  1. Setup prerequisites
  2. Install gitlab-mirrors
  3. Manage your mirrors

License

Created by Sam Gleske under MIT License.


References

This project is meant to temporarily fill in a gap left by GitLab for managing remote repository mirrors (namely git and svn). See the following user voice topics which enabled me to create this project in the mean time.

This project will still be useful after repository mirror support is native in GitLab because it allows admins to mirror massive amounts of repositories in an automated fashion. When native mirror support is included this project will likely be refactored into a script to automate adding mirrors via the API.