Updated on 2024-11-22 GMT+08:00

Importing a Git Repository Using a URL

  1. Go to the CodeArts Repo homepage, click New Repository, and select an existing project from the Project drop-down list box or create a project.
  2. Set repo type to Import and import from Git Url. For details about how to set parameters, see Table 1.

    Table 1 Parameters for obtaining authorization

    Parameter

    Description

    Source Repository URL

    Mandatory. Specify the repo path to be imported. The source repo path must start with http:// or https:// and end with .git.
    NOTE:
    • If the repo file is too large or the network quality is poor, it may take more than 30 minutes to import the repo file. If the import times out, you are advised to use the clone or push function on the client. For details, see External Repository Import Times Out.
    • The repository domain must be connected to the service node.

    Verification to Access Source Repo

    Mandatory. There are two cases:

    • If the imported source repository is open to all visitors, select Not needed.
    • If the imported source repository is private, select Needed. Currently, two authentication modes are supported: By service endpoint and By username and password. For details about how to set parameters, see Verifying the Import Permission.

  3. Click Next. On the Basic Information page, set parameters by referring to the parameter table.
  4. Set the parameters for syncing a repo by referring to table 1.
  • After the parameters are set, the Code page for creating the repo is displayed.
  • On the repository list page, if the new repository name is in gray with a red exclamation mark next to it, the repository fails to be imported. The possible cause is that the username, password, or access token is incorrect. You can delete the code repository and perform the preceding steps to import the external repo again.
  • Currently, Git supports the following external import sources: bitbucket.org, code.aliyun.com, coding.net, git.qcloud.com, gitee.com, github.com, gitlab.com, visualstudio.com and xiaolvyun.baidu.com.
  • After a code repo is created, only the creator can access the repo. Other project members need to be manually added to the repo and assigned with permissions. Therefore, you need to manually add members to the repository and configure access permissions for the new members.