Help Center/ CodeArts Artifact/ User Guide/ Self-Hosted Repos (New)/ Uploading/Downloading Packages on the Client/ Uploading and Downloading a Generic Artifact via the Client
Updated on 2026-08-10 GMT+08:00

Uploading and Downloading a Generic Artifact via the Client

CodeArts Artifact can connect to local clients. You may upload your private packages from your local client to self-hosted repos and share them with others, who can download these packages through their clients.

Generic Artifact

Generic artifacts (also called common artifacts) are files of any type generated during the build and release process.

Constraints

The repository password for a self-hosted repo is account-specific. If you are prompted for a password while using a different account, download the configuration file from the repository's Tutorial tab to obtain it.

Prerequisites

Uploading a Generic Artifact via the Client

  1. Access self-hosted repos using your Huawei Cloud account.
  2. Select the target Generic repository on the self-hosted repo page.
  3. Click Tutorial on the right of the page.
  4. In the displayed dialog box, click Download Guide File to download the generic.txt file.

  5. Upload the Generic artifact to the repository.

    curl -k -u "{{username}}:{{password}}" -X PUT {{repo_url}}/{{filePath}} -T {{localFile}}
    • file path: path (including the name) of the Generic repository to be uploaded.
    • localFile: path (including the name) of the local Generic artifact.
    • Obtain the values of username, password, and repo_url from the downloaded generic.txt file in 4, as shown in the following figure:

Downloading a Generic Artifact Using the Client

  1. Access self-hosted repos using your Huawei Cloud account.
  2. Select the target Generic repository on the self-hosted repo page.
  3. Click Tutorial on the right of the page.
  4. In the displayed dialog box, click Download Guide File to download the generic.txt file.
  5. Download the package using the client.

    curl -o {{localFileName}} -k -u "{{username}}:{{password}}" -X GET {{repo_url}}/{{filePath}}
    • localFileName: local path (including the name) for downloading the Generic artifact.
    • filePath: path (including the name) of the package in the Generic repository.
    • Obtain the values of username, password, and repo_url from the downloaded generic.txt file in 4, as shown in the following figure: