Uploading and Downloading an RPM Package via the Client
CodeArts Artifact can connect to local RPM clients. You may upload your private packages from your local RPM client to self-hosted repos and share them with others, who can download these RPM packages through their clients.
RPM Package
Red Hat Package Manager (RPM) is a package format and management tool originally developed by Red Hat and now widely used across Linux distributions such as Red Hat Enterprise Linux (RHEL), Fedora, CentOS, and SUSE. RPM packages are files that contain software and metadata, used to install, upgrade, and remove software packages.
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
- The client tool is Linux OS with yum. Ensure that the Linux OS is used and yum has been installed.
If the following information is displayed, yum has been installed on the server.

- You have created an RPM repository.
- You have the Download/View permission on the current repository. For details about how to obtain this permission, see Configuring Repository Permissions.
Uploading an RPM Package via the Client
- Access self-hosted repos using your Huawei Cloud account.
- Select the target RPM repository on the self-hosted repo page.
- Click Tutorial on the right of the page.
- In the displayed dialog box, click Download Configuration File.
- On the Linux host, run the following command to upload an RPM package:
curl -k -u {{user}}:{{password}} -X PUT https://{{repoUrl}}/{{component}}/{{version}}/ -T {{localFile}}In this command, user, password, and repoUrl can be obtained from the RPM upload command in the configuration file downloaded in the previous step.
- user: character string before the colon (:) between curl -u and -X
- password: character string after the colon (:) between curl -u and -X
- repoUrl: character string between https:// and /{{component}}

component, version, and localFile can be obtained from the RPM package to be uploaded. The hello-0.17.2-54.x86_64.rpm package is used as an example.
- component: software name, for example, hello.
- version: software version, for example, 0.17.2.
- localFile: RPM package, for example, hello-0.17.2-54.x86_64.rpm.
The following figure shows the complete command.

After the command is successfully executed, go back to the self-hosted repo and find the uploaded RPM package.
Downloading an RPM Package via the Client
- Access self-hosted repos using your Huawei Cloud account.
- Select the target RPM repository on the self-hosted repo page.
- Click Tutorial on the right of the page.
- In the displayed dialog box, click Download Configuration File.
- Open the configuration file, replace all {{component}} placeholders with the value used when uploading the RPM file (for example, hello in this document), remove the RPM upload command, and save the file.
- Save the modified configuration file to the /etc/yum.repos.d/ directory on the Linux host.

- Run the following command to download the RPM package. Replace hello with the actual value of component.
yum install hello
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