Creating a Virtual Repository
A virtual repository aggregates local and proxy repositories, offering a single, unified entry for accessing artifacts.
Prerequisites
- You have created a CodeArts project.
- You have the createRepository permission. For details about how to add this permission, see Configuring Repository Permissions.
Procedure
- Use your Huawei Cloud account to access self-hosted repos.
- Click Create Repository.

- Enter repository information as prompted.
- Select a repository type.
Set Repository Type to Virtual Repo. Select the package type for your repository, for example, Maven, npm, or PyPI.
- Configure the basic information, as described in the following table.
Table 1 Parameters Item
Description
Repository Name
You can enter a unique repository name. For example, to create a Maven repository, you can name it maven-virtual.
Enter up to 50 characters. Only letters, digits, underscores (_), hyphens (-), and periods (.) are supported.
Project
The project to which the current repository belongs. If no project exists, click New Project in the drop-down list to create one.
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.
- Select a repository type.
- Confirm the configurations and click OK.
After the virtual repository is created, you can view it in the repository list.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot