Updated on 2025-08-05 GMT+08:00

Creating a Repository

If you use this service for the first time, you need to create a repository. Self-hosted repos are divided into local repositories and virtual repositories.

Local Repository: An actual physical repository hosted on the server, where you can upload different types of artifacts.

Virtual Repository: You can configure proxy sources in a virtual repository to connect with local third-party repositories. A virtual repository also offers local repository functions and provides a unified entry to make setup easier for you.

Constraints

Docker registry and CocoaPods repository currently are only available in the AP-Singapore region.

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

Prerequisites

Procedure

  1. Access Self-hosted Repos.
  2. Choose Artifact > Self-hosted Repos from the navigation pane. Click Create Repository in the upper right corner of the page. The Create Repository page is displayed.
  3. Configure the basic information by referring to Table 1 and Table 2.

    Table 1 Parameters for configuring a repository

    Item

    Mandatory

    Description

    Repository Type

    Yes

    You can choose Local Repo or Virtual Repo.

    • A local repository is hosted on the server and is a physical repository that stores artifact data.
    • A virtual repository combines local and proxy repositories, offering a single, unified entry for accessing artifacts.

    Repository Name

    Yes

    Enter up to 20 characters. Only letters, digits, underscores (_), hyphens (-), and periods (.) are supported.

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

    Package Type

    Yes

    Local repository supports Maven, npm, RPM, PyPI, Go, Debian, Conan, NuGet, CocoaPods, Generic, OHPM, and Docker artifacts.

    Virtual repository supports Maven, npm, PyPI, Conan, OHPM, and Docker artifacts.

    The parameters vary based on the package type. Configure them by referring to Table 2.

    Docker registry and CocoaPods repository currently are only available in the AP-Singapore region.

    Project

    Yes

    Choose a project to associate with the new repository. After the settings are complete, the project to which the repository belongs cannot be changed.

    Description

    No

    Enter up to 200 characters.

    Table 2 Parameters of different package types

    Package Type

    Parameter

    Mandatory

    Description

    Maven

    Associated Projects

    Yes

    Select the name of the project to be associated from the drop-down list.

    Include Patterns

    No

    Enter rules to specify paths allowed for artifact uploads. By default, all artifact paths are allowed. During builds, only Maven files whose paths start with the preceding path prefix can be uploaded to the self-hosted repo.

    For example, if you add demo, that is, demo/**/*, all paths starting with demo/ are allowed.

    You can click + to add multiple inclusion rules.

    Exclude Patterns

    No

    Enter rules to specify paths not allowed for artifact uploads. During builds, Maven files whose paths start with the preceding path prefix cannot be uploaded to the self-hosted repo.

    For example, if you add demo, that is, demo/**/*, all paths starting with demo/ are allowed.

    You can click + to add multiple exclusion rules.

    Version Policy

    Yes

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

    • The Release repository is used to store release versions with stable functions that will no longer be updated.
    • The Snapshot repository is used to store development versions with unstable functions in the development stage.

    npm

    Include Patterns

    No

    Enter rules to specify paths allowed for artifact uploads. During builds, only npm files whose paths start with the preceding path prefix can be uploaded to the self-hosted repo.

    For example, if you add demo, that is, demo/**/*, all paths starting with demo/ are allowed.

    You can click + to add multiple inclusion rules.

    Exclude Patterns

    No

    Enter rules to specify paths not allowed for artifact uploads. During builds, npm files whose paths start with the preceding path prefix cannot be uploaded to the self-hosted repo.

    For example, if you add demo, that is, demo/**/*, all paths starting with demo/ are allowed.

    You can click + to add multiple exclusion rules.

    RPM

    Include Patterns

    No

    Enter rules to specify paths allowed for artifact uploads. During builds, only RPM binary files whose paths start with the preceding path prefix can be uploaded to the self-hosted repo.

    For example, if you add demo, that is, demo/**/*, all paths starting with demo/ are allowed.

    You can click + to add multiple inclusion rules.

    Exclude Patterns

    No

    Enter rules to specify paths not allowed for artifact uploads. During builds, RPM binary files whose paths start with the preceding path prefix cannot be uploaded to the self-hosted repo.

    You can click + to add multiple exclusion rules.

    PyPI

    Include Patterns

    No

    Enter rules to specify paths allowed for artifact uploads. During builds, only PyPI dependencies in which the name value in the setup.py file matches the preceding path prefix can be uploaded to the self-hosted repo.

    For example, if you add demo, that is, demo/**/*, all paths starting with demo/ are allowed.

    You can click + to add multiple inclusion rules.

    Exclude Patterns

    No

    Enter rules to specify paths not allowed for artifact uploads. During builds, PyPI dependencies in which the name value in the setup.py file matches the preceding path prefix cannot be uploaded to the self-hosted repo.

    You can click + to add multiple exclusion rules.

    Go

    Include Patterns

    No

    Enter rules to specify paths allowed for artifact uploads. During builds, only Go files whose paths start with the preceding path prefix can be uploaded to the self-hosted repo.

    For example, if you add demo, that is, demo/**/*, all paths starting with demo/ are allowed.

    You can click + to add multiple inclusion rules.

    Exclude Patterns

    No

    Enter rules to specify paths not allowed for artifact uploads. During builds, Go files whose paths start with the preceding path prefix cannot be uploaded to the self-hosted repo.

    You can click + to add multiple exclusion rules.

    Conan

    Include Patterns

    No

    Enter rules to specify paths allowed for artifact uploads. During builds, only Conan files whose paths start with the preceding path prefix can be uploaded to the self-hosted repo.

    For example, if you add demo, that is, demo/**/*, all paths starting with demo/ are allowed.

    You can click + to add multiple inclusion rules.

    Exclude Patterns

    No

    Enter rules to specify paths not allowed for artifact uploads. Conan files whose paths start with the preceding path prefix cannot be uploaded from a local client to the self-hosted repo.

    You can click + to add multiple exclusion rules.

    NuGet

    Include Patterns

    No

    Enter rules to specify paths allowed for artifact uploads. During builds, only NuGet files whose paths start with the preceding path prefix can be uploaded to the self-hosted repo.

    For example, if you add demo, that is, demo/**/*, all paths starting with demo/ are allowed.

    You can click + to add multiple inclusion rules.

    Exclude Patterns

    No

    Enter rules to specify paths not allowed for artifact uploads. NuGet files whose paths start with the preceding path prefix cannot be uploaded from a local client to the self-hosted repo.

    You can click + to add multiple exclusion rules.

    CocoaPods

    Include Patterns

    No

    Enter rules to specify paths allowed for artifact uploads. During builds, only CocoaPods files whose paths start with the preceding path prefix can be uploaded to the self-hosted repo.

    For example, if you add demo, that is, demo/**/*, all paths starting with demo/ are allowed.

    You can click + to add multiple inclusion rules.

    Exclude Patterns

    No

    Enter rules to specify paths not allowed for artifact uploads. During builds, CocoaPods files whose paths start with the preceding path prefix cannot be uploaded to the self-hosted repo.

    You can click + to add multiple exclusion rules.

    Generic

    Include Patterns

    No

    Enter path rules not allowed for artifact uploads. You can click + to add multiple paths. During builds, only Generic files whose paths start with the preceding path prefix can be pushed to the self-hosted repo.

    For example, if you add demo, that is, demo/**/*, all paths starting with demo/ are allowed.

    You can click + to add multiple inclusion rules.

    Exclude Patterns

    No

    Enter rules to specify paths not allowed for artifact uploads. During builds, Generic files whose paths start with the preceding path prefix cannot be uploaded to the self-hosted repo.

    During builds, Generic files whose paths start with the preceding path prefix cannot be pushed to the self-hosted repo.

    You can click + to add multiple exclusion rules.

    OHPM

    Include Patterns

    No

    Enter rules to specify paths allowed for artifact uploads. During builds, only OHPM files whose paths start with the preceding path prefix can be pushed to the self-hosted repo.

    For example, if you add demo, that is, demo/**/*, all paths starting with demo/ are allowed.

    You can click + to add multiple inclusion rules.

    Exclude Patterns

    No

    Enter rules to specify paths not allowed for artifact uploads. During builds, OHPM files whose paths start with the preceding path prefix cannot be uploaded to the self-hosted repo.

    You can click + to add multiple exclusion rules.

    Docker

    Include Patterns

    No

    Enter rules to specify paths allowed for artifact uploads. During builds, only image files whose paths start with the preceding path prefix can be pushed to the self-hosted repo.

    For example, if you add demo, that is, demo/**/*, all paths starting with demo/ are allowed.

    You can click + to add multiple inclusion rules.

    Exclude Patterns

    No

    Enter rules to specify paths not allowed for artifact uploads. Image files whose paths start with the preceding path prefix cannot be pushed to the self-hosted repo.

    You can click + to add multiple exclusion rules.

  4. Click OK. The new repository displays in the repository list on the left.