Mirror a Git repository

As an administrator or space owner, you can create a mirror repository to maintain a read-only, synchronized copy of a remote Git repository in PulseUno. You can mirror any Git repository to which PulseUno can connect.

Create a mirrored Git repository

When creating a mirrored repository, you can choose which branches, tags, and commits to mirror and how often to pull data from the source repository.

Note: A mirror is a read-only copy of the source repository. You cannot make changes or push to the mirror.

To mirror an external Git repository:

  1. On the top navigation bar, from the spaces list, select the space where you want to add a Git repository.
  2. On the Products page, click New and select Create Git Repository.
  3. On the new Git repository page, provide the details for the mirror repository:

    Field Description
    Repository name

    Enter a name for the mirror repository. The name becomes a part of the repository path.

    Note: The URL of your repository is displayed under the repository name.

    Description (Optional) Enter additional information about the repository.
    Initialize repository

    Select Mirror another Git repository and enter information about the source repository to be mirrored:

    1. Enter the HTTP/S URL of the source repository, for example:

      https://github.com/<owner>/<repo>

      For GitHub repositories, specify the URL without the .git extension.

    2. To authenticate to the source repository with a username and password, select Use Basic Authentication and enter the credentials.

      For GitHub repositories, enter a username and personal access token.

    3. To authenticate to the source repository with a PKCS12 certificate, select Use Authentication with Client Certificate (PKCS12). Upload a PKCS12 file containing the public certificate and private key.

      If the PKCS12 file is protected with a password, specify the keystore password.

    4. To define how often to sync repositories, select the refresh period from the list. By default, PulseUno syncs repositories every hour.

    5. To define which branches and/or tags to synchronize, enter a comma-separated list of fnmatch patterns.

      For example, to sync all the branches that start with dev-, enter: dev-*

      Leave empty to sync all branches and tags.

    Visibility level

    Define who has access to the repository:

    • Private (default). Only logged in users with member permissions have access to the repository.
    • Internal. Logged in users without member permissions have guest access and can clone or pull the repository. Unauthenticated users have no access.
    • Public. Logged in users without member permissions as well as unauthenticated users have guest access and can clone or pull the repository.
    Requests provided by

    (Optional) To use requests with commits, select a request provider.

    PulseUno supports requests from Dimensions CM, ALM Octane, and Atlassian Jira.

    Check lists

    To use a check list for reviews and pull requests, select Enable check lists in reviews and pull requests, and then select the check list.

    For details about check lists, see Create review check lists.

  4. Click Save.

Mirrored Git repositories are displayed with a Mirror tag next to them.

Tip: You can mirror a branch of the mirrored Git repository from PulseUno into Dimensions CM. For details, see Mirror a Git repository branch into Dimensions CM.

Back to top

Reconfigure a mirrored Git repository

In the Mirror settings, you can change the sync period, authentication method, and branches/tags to synchronize. You can also enable notifications and choose not to mirror changes that have been forced.

For details on how to change a Git repository's general settings, see Manage Git repositories.

To update mirroring settings:

  1. On the top navigation bar, select a space from the spaces list.

  2. On the Products page, open a mirrored Git repository.

  3. On the sidebar, select Settings > Mirror.

  4. Change the Git repository's configuration, as needed:

    Field Description
    URL

    If the source Git repository has moved, you can update its URL to point to the new location.

    Caution: Do not change the URL to a different Git repository.

    Refresh period

    Specify how often to pull data from the source repository to keep the mirror in sync.

    To turn off syncing, disable the refresh period.

    Use Basic Authentication
    Username Enter a username to authenticate to the source repository.
    Password

    Click Set password and enter a password to authenticate to the source repository.

    Note: For GitHub repositories, enter a personal access token.

    Use Authentication with Client Certificate (PKCS12)
    Certificate with Key (PKCS12) To authenticate to the source repository with a PKCS12 certificate, upload a PKCS12 file containing the public certificate and private key.
    Key store password If the PKCS12 file is protected with a password, click Set password and specify the keystore password.
    Use Filters
    Branches and Tags

    Update the list of branches and tags to synchronize.

    Enter a comma-separated list of glob patterns. Leave empty to sync all branches and tags.

    Caution: To ensure that the branches and tags are mirrored as expected after you make changes, manually sync the mirror. See Manually sync a mirrored Git repository. Then select Settings > Branches on the sidebar, and click Synchronize Branches.

    Fast-forward only Select this option to reject changes on mirrored branches and tags if the changes have been forced.
    Notifications
    Send email when mirroring begins to fail Select this option to send notifications to repository owners if the mirror fails to synchronize with the source.
  5. Click Save.

Back to top

Manually sync a mirrored Git repository

You can manually synchronize a mirrored Git repository with its source. Review the mirroring log to get information about recent operations.

To force a mirrored Git repository sync:

  1. On the top navigation bar, select a space from the spaces list.

  2. On the Products page, open the mirrored Git repository to sync.

  3. On the toolbar, select Settings > Mirror.

  4. On the Mirror settings page, in the in the upper-right corner, click Sync Now. The synchronization starts immediately.

  5. To open the repository mirroring log, click View Log. The log includes a record of the last 20 operations.

Back to top

Stop mirroring

As an administrator or space owner, you can stop mirroring a Git repository. After you remove mirroring, the repository becomes editable and you can push changes to it.

Caution: Mirroring cannot be reenabled. When you stop mirroring, this permanently breaks the connection with the source repository.

To stop mirroring a Git repository:

  1. On the top navigation bar, select a space from the spaces list.

  2. On the Products page, open a mirrored Git repository.

  3. On the toolbar, select Settings > Advanced.

  4. On the Advanced page, click Permanently stop mirroring.
  5. Click Stop mirroring now to confirm.

Back to top

See also: