Updated on 2023-12-04 GMT+08:00

Importing an External Repository

You can import a cloud repository to CodeArts Repo or import a CodeArts Repo repository from a region to another region (see Repository Backup). The imported repository is independent of the source repository.

To import an external repository on the CodeArts Repo console, perform the following steps:

  1. Access the repository list page.
  2. Click next to New Repository and select Import Repository from the drop-down list.

    • An external repository can be a Git remote repository (HTTPS) or SVN repository.
    • The source repository port can be 80, 443, or greater than 1024.
    • Currently, GitHub, Gitee, GitLab, and SVN source repositories are supported. If the import using other types of source repositories fails, contact technical support to check the source server whitelist.

  3. Enter the source repository path, and enter the username and password for accessing the source repository. (This parameter is not required for open-source repositories.)

  4. Click Next. On the Create Repository page, enter the basic information about the repository.

    Table 1 Parameter description

    Parameter

    Mandatory

    Remarks

    Repository Name

    Yes

    The name must start with a letter, digit, or underscore (_) and can contain periods (.) and hyphens (-), but cannot end with .git, .atom. The name can contain a maximum of 200 characters.

    Description

    No

    Enter a description for your repository. The description can contain a maximum of 2,000 characters.

    Permissions

    No

    • Make all project developers automatic repository members

      If you select this option, the project developer is automatically added as a repository member. By default, the project manager is a repository member.

    • Create a code check task automatically (for free).

      After the repository is created, you can view the code check task of the repository in the check task list

    Visibility

    Yes

    The options are as follows:

    • Private

      The repository is visible only to repository members. Repository members can access the repository or commit code.

    • Public read-only

      The repository is open and read-only to all visitors. You can select an open-source license as the remarks.

    Branch

    Yes

    You can choose to synchronize the default branch or all branches of the source repository.

    Schedule

    No

    Select Schedule sync into repo.

    • The default branch of the source repository is automatically imported to the default branch of the new repository every day.
    • The repository becomes a read-only image repository and cannot be written. In addition, only the branches of the third-party repository corresponding to the default branch of the current repository are synchronized.

  5. Click OK to import the repository. The repository list page is displayed.
  • The timeout interval for importing a repository is 30 minutes. If the import times out, use the clone/push function on the client.
  • The Git LFS object is not imported.
  • The repository domain must be connected to the service node.