Updated on 2023-08-07 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.

Currently, this function is not supported at AP-Singapore. Check your access point (AP) in the upper left corner.

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

    • Allow project members to access the repository

      The project manager is automatically set as the repository administrator, and the developer is set as a common repository member. When the two roles are added to the project, they will be automatically synchronized to existing repositories.

    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.

    You can synchronize branches manually. In addition, you can also schedule synchronization. This setting cannot be changed after you configure it. For details, see Repository Synchronization

  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.