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.
To mirror an external Git repository:
- From the spaces list at the top right, select the space where you want to add a Git repository.
- On the Products page, click Create Git Repository.
-
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:
-
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.
-
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.
-
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.
-
To define how often to sync repositories, select the refresh period from the list. By default, PulseUno syncs repositories every hour.
-
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.
-
- Click Save.
Mirrored Git repositories are displayed with a Mirror tag next to them.
Note: In a new Git repository, pull requests are created automatically and reviews are not enabled by default. For details, see Git repository defaults.
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:
-
From the spaces list at the top right, select a space.
-
On the Products page, open a mirrored Git repository.
-
In the sidebar, select Settings > Mirror.
-
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 in 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. -
Click Save.
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:
-
From the spaces list at the top right, select a space.
-
On the Products page, open the mirrored Git repository to sync.
-
In the toolbar, select Settings > Mirror.
-
On the Mirror settings page, click Sync Now at the top right. The synchronization starts immediately.
-
To open the repository mirroring log, click View Log at the top right. The log includes a record of the last 20 operations.
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:
-
From the spaces list at the top right, select a space.
-
On the Products page, open a mirrored Git repository.
-
In the toolbar, select Settings > Advanced.
- On the Advanced page, click Permanently stop mirroring.
- Click Stop mirroring now to confirm.
See also: