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
- You have created a Generic repository.
- You have the Download/View permission on the current repository. For details about how to obtain this permission, see Configuring Repository Permissions.
Uploading a Generic Artifact via the Client
- Access self-hosted repos using your Huawei Cloud account.
- Select the target Generic repository on the self-hosted repo page.
- Click Tutorial on the right of the page.
- In the displayed dialog box, click Download Guide File to download the generic.txt file.

- 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
- Access self-hosted repos using your Huawei Cloud account.
- Select the target Generic repository on the self-hosted repo page.
- Click Tutorial on the right of the page.
- In the displayed dialog box, click Download Guide File to download the generic.txt file.
- 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:

Feedback
Was this page helpful?
Provide feedbackThank 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