Repository synchronization
This topic describes how to import content from a third-party code repository by using repository synchronization in Codeup.
Background
When migrating to a new code platform, you can minimize disruption to daily operations by first migrating less sensitive parts of a repository to Codeup and setting up the corresponding development process. Once the new setup is stable on Codeup, you can block new writes to the old platform to ensure data consistency. Before this final cutover, you must synchronize any new data from the old platform to the new one.
Prerequisites
Synchronizing code forcefully overwrites the contents of the current repository. This operation bypasses rules such as protected branch settings and can result in significant data changes. For this reason, only a repository administrator can perform a synchronization. To learn how to set a repository administrator, see platform permission settings.
Only code repositories imported from the web interface and GitLab repositories imported by using the self-hosted GitLab migration tool (BETA) support synchronization. Repositories created from other sources do not support the synchronization feature. For information about how to import third-party code repositories from the web interface, see Import third-party code repositories from the web interface.
Step 1: Find the synchronization entry point
As a repository administrator, navigate to the source file overview page of your repository. Click Go to Sync to view the time and status of the most recent synchronization.
NoteClicking Go to Sync redirects you to the synchronization settings page.
In the left-side navigation pane, choose .
By default, synchronization is enabled for repositories imported from third-party sources. If you no longer require synchronization, you can manually disable the service.
Step 2: Configure the authorized account
If the third-party repository is a public repository, no authorization is required. You can click Sync Now. If it is a private repository, you must configure authorization before syncing.
On the repository synchronization page, locate the authorized account field. If it reads "Not Set", click the adjacent Set Now link to configure the authorization.
Authorization parameters:
Account: The account used to clone the source repository over HTTP.
Password/access token: The password or access token used to clone the source repository over HTTP. To learn how to generate a token, see How do I obtain an access token? In the Update Authorization dialog box, enter your Password/access token and click OK to save the settings.
Step 3: Trigger the synchronization
After configuring authorization, click Sync Now on the Repository Synchronization page. A confirmation dialog box appears with important notes. Review the notes, and then click OK to trigger the synchronization.
Force syncing will overwrite all Git changes in the current repository that differ from the remote repository.
To ensure data consistency, the system temporarily disables writes to the repository during the synchronization process.
The synchronization process bypasses rules such as protected branch and push rule settings.
If data in the third-party repository changes, it completely overwrites the content of the current repository, including commit history and comment data. Use the repository synchronization feature only in appropriate scenarios. This feature is not suitable for parallel development where commits are made to both the old and new platforms simultaneously.
The synchronization process takes time to complete.
After you trigger the synchronization, a notification appears at the top of the page: The repository is syncing. Operations are temporarily unavailable. Please try again later. The Sync Now button becomes grayed out and displays Syncing. A synchronization history table appears at the bottom of the page. The table includes columns for Operator, Sync time, Status, Description, and Sync method. The status can be Pending sync or failed. If a sync fails, the Description column shows the reason, such as "Unknown exception, please retry."
Plan accordingly, as writes to the repository are disabled during this time. Poor network conditions or very large repositories may increase the synchronization time. You can navigate away from the page. You will receive an email notification upon completion.
If a timeout occurs when importing from a self-hosted repository, you may need to adjust the network bandwidth of your self-hosted instance.