Mirroring

Operations workflow page for the GitLab mirroring setup

Process

To setup mirroring in a secure and scalable way, use the following steps:

  1. Login as the gl-support-bot user
  2. Navigate to the source project
  3. Add a new mirror
    • Git repository URL: ssh://gitlab.com/full/path/to/project.git
    • Mirror direction: Push
    • Authentication method: SSH public key
    • Username: git
    • Keep divergent refs: unchecked
    • Mirror branches: Mirror only protected branches
  4. Copy SSH public key from new mirror
  5. Navigate to the target project
  6. Add a new deploy key (under Settings > Repository > Deploy Keys)
    • Title: full/path/to/project
    • Key: The value copied in step 4
    • Grant write permissions to this key: checked
    • Expiration date (optional): leave it blank
  7. Navigate to the source project
  8. Force an update on the mirror (under Settings > Repository > Mirroring repositories)
Last modified May 20, 2025: Adding mirroring information (c8424fbd)