Updated on 2026-08-10 GMT+08:00

Creating a Local Repository

A local repository stores all artifacts on the CodeArts Artifact server. It is used to store and manage build outputs, dependencies, and third-party artifacts. If you use this service for the first time, you need to create a repository.

Prerequisites

Procedure

  1. Use your Huawei Cloud account to access self-hosted repos.
  2. Click Create Repository.

  3. On the displayed page, select a repository type. For example, set Repository Type to Local Repo and then select the package type (such as Maven, npm, or PyPI) for the repository.
  4. Configure the basic settings for the local repository by referring to Table 1.

    Table 1 Parameters for creating a local repository

    Item

    Description

    Repository Name

    You can enter a unique repository name. Enter up to 50 characters. Only letters, digits, underscores (_), hyphens (-), and periods (.) are supported.

    For example, to create a local repository, you can name it maven-local.

    WARNING:

    After a repository is created, its name cannot be changed.

    Project

    The project to which the current repository belongs. If no project exists, click New Project in the drop-down list to create one.

    WARNING:

    The project cannot be changed after being set.

    Associated Projects

    This parameter is available only when Package Type is set to Maven.

    This parameter is used to share artifacts in CodeArts Build. By default, CodeArts Build pulls artifacts only from repositories in the current project. You can configure associated projects to share artifacts across projects. After the target repository is associated with the project where the build task is located, build tasks in that project can pull artifacts from the repository.

    Include Patterns

    Specify the files to include in the operation. These patterns are usually used to filter in and select specific files or folders. If you configure this parameter, only artifacts that match the added path prefix can be operated on (including artifact uploads and downloads).

    You can click + to add multiple inclusion rules. The relationship between multiple inclusion rules is OR.

    Exclude Patterns

    Specify the files to exclude from the operation. These patterns are usually used to filter out and select specific files or folders. If you configure this parameter, artifacts that match the added path prefix cannot be operated on (including artifact uploads and downloads).

    You can click + to add multiple exclusion rules. The relationship between multiple exclusion rules is OR.

    Version Policy

    This parameter is available only when Package Type is set to Maven.

    The options are Release, Snapshot, and Release&Snapshot.

    Two repositories will be generated: Release and Snapshot. The Release repository is selected by default and the Snapshot and Release&Snapshot repository can also be selected as required.

    • The Release repository stores release versions with stable functions that will no longer be updated.
    • The Snapshot repository stores development versions with unstable functions in the development stage.
    • The Release&Snapshot repository stores release and snapshot versions simultaneously.

    Open To

    Set the repository permission scope.

    • If you select Project, the created repository belongs to the associated project. Repositories in a project use roles in the project for authentication. For details about repository permissions by role in a project, see Configuring Project-Level Permissions.
    • If you select Tenant, the created repository will belong to the tenant associated with it. Repositories within a tenant use tenant space role authentication. For details about repository permissions by role in a tenant, see Configuring Repository-Level Permissions.

    Description

    Enter up to 200 characters to describe the repository, such as its purpose or usage.

  5. Check all configured information and click OK.

    After the local repository is created, you can view it in the repository list.