Skip to content

Creating a Mirror Project


To use this feature, you need user permissions to create mirrors. You can request permissions from your service administrator. For permissions in the cloud version of GitFlic, please contact support.

Setup

To create a new project mirror, click the dropdown menu in the top menu with the + icon. Select "New Mirror".

Mirroring

Original Project Privacy

To create a mirror of a public project, paste the repository link on the creation page. The link must end with .git. Fill in all other fields as for a regular project and click "Create". Your project will be queued for mirroring and will be updated automatically after some time (usually within 10 minutes, excluding queue time).

To create a mirror of a private project, also paste the project link ending with .git. Additionally, you need to fill in the Login and Token fields. There are two options:

  1. Enter the email in the Login field and the password of a user with access to the private project in the Token field.

  2. Create a deployment token. You can find detailed instructions here. Enter the username of the user who created the token in the Login field. Fill the Token field with the generated token.

Mirroring

Mirroring Frequency

In the Self-Hosted version of GitFlic, the mirror update frequency can be configured in the admin panel.

In the cloud version of GitFlic, mirror repositories are updated once a day.

Mirroring Strategy

A mirror can operate in two strategies: PULL and PUSH. When choosing the PULL strategy, the created mirror project will copy the specified original project. The PUSH strategy allows you to keep the project you specify up to date.

Any project can be made a PUSH mirror. To do this, go to the danger zone of the main settings of the selected project and find the Make repository a PUSH mirror function.

Mirroring Specific Elements

To mirror specific branches or tags, use the RefSpec setting. The mask for this field is: refs/<heads/tags>/<branch/tag>:refs/<heads/tags>/<branch/tag>. The part before : specifies the elements to be mirrored. The part after : specifies the elements where mirroring will occur.

You can configure mirroring of multiple branches or tags at once by specifying a separate setting for each element, separated by commas.

To mirror all branches or tags, use an asterisk * in place of <branch/tag>.

Note that it is not necessary to pre-create empty branches where mirroring should occur. The service can create them automatically.

Examples:

refs/heads/master:refs/heads/mymaster

*With this setting, only the master branch will be mirrored to the mymaster branch*
refs/tags/3.0.0:refs/tags/tag

*With this setting, only the 3.0.0 tag will be mirrored to the tag named tag*
refs/heads/develop:refs/heads/dev, refs/tags/*:refs/tags/*

*With this setting, the develop branch will be mirrored to the dev branch, and all tags with identical names will also be mirrored*

Completing Mirror Creation

After the mirroring process is complete, your project will have a "Mirror" label and a link to the original project at the top.

Mirroring

Automated translation!

This page was translated using automatic translation tools. The text may contain inaccuracies.