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.
- 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.
Created by Sam Gleske under MIT License.
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.
- Mirror git/svn into repo.
- Feature request -- Multi-Master mirroring
- Git mirror
- Git push all branches
- Git update mirror
- Splitting Subversion into Multiple Git Repositories
- Git-svn Tutorial
- Why git can't clone into a bare repository
- How to convert a git repository from normal to bare
- Converting CVS repositories to git
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.