このページは、お客様の言語ではご利用いただけません。Huawei Cloudは、より多くの言語バージョンを追加するために懸命に取り組んでいます。ご協力ありがとうございました。
- What's New
- Function Overview
- Service Overview
-
Getting Started
- Uploading Software Packages to Release Repos
- Uploading Components to Maven Repository
- Releasing/Obtaining a Maven Component via a Build Task
- Releasing/Obtaining an npm Component via a Build Task
- Releasing/Obtaining a Go Component via a Build Task
- Releasing/Obtaining a PyPI Component via a Build Task
- Uploading/Obtaining an RPM Component Using Linux Commands
- Uploading/Obtaining a Debian Component Using Linux Commands
-
User Guide
- CodeArts Artifact User Guide
- Release Repos 2.0
- Self-Hosted Repos 2.0
- Release Repos 1.0
- Self-Hosted Repos 1.0
- Whitelist for All Accounts
-
Best Practices
- CodeArts Artifact Best Practices
- Releasing Maven Components and Archiving to a Self-Hosted Repo
- Releasing/Obtaining an npm Component via a Build Task
- Releasing/Obtaining a Go Component via a Build Task
- Releasing/Obtaining a PyPI Component via a Build Task
- Uploading/Obtaining an RPM Component Using Linux Commands
- Uploading/Obtaining a Debian Component Using Linux Commands
- Batch Migrating Maven/npm/PyPI Components to a Self-Hosted Repo
- API Reference
-
FAQs
- Release Repo
-
Self-Hosted Repo
- How Do I Upload Snapshots to a Maven Repository?
- How Do I Pull Components from a Maven Repository?
- Can I Call Software Packages in Self-Hosted Repos During Local Builds?
- What Should I Do With Error Code 500 When Uploading Maven Package for a Gradle Build?
- Why Did the Dependency WAR or JAR Files Fail to Be Downloaded?
- Why Is Error 401 Returned When Uploading Maven Components to Self-Hosted Repos?
- General Reference
Copied.
Uploading/Obtaining an RPM Component Using Linux Commands
This section describes how to use Linux commands to upload a component to an RPM repository and obtain a dependency from the repository.
Prerequisites
- An RPM component is available.
- A Linux host that can connect to the public network is available.
- You have created an RPM repository.
- You have permissions for the current repository. For details, see Configuring Repository Permissions 2.0
Releasing a Component to an RPM Repository
- Log in to CodeArts Artifact and access the RPM repository. 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 component:
curl -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 component. The hello-0.17.2-54.x86_64.rpm component is used as an example.
- component: software name, for example, hello.
- version: software version, for example, 0.17.2.
- localFile: RPM component, for example, hello-0.17.2-54.x86_64.rpm.
The following figure shows the complete command.
- After the commands are successfully executed, go to the self-hosted repo and find the uploaded RPM component.
Obtaining a Dependency from an RPM Repository
The following procedure uses the RPM component released in Releasing a Component to an RPM Repository as an example to describe how to obtain a dependency from an RPM repository.
- Download the configuration file by referring to Releasing a Component to an RPM Repository.
- Open the configuration file, replace all {{component}} in the file with the value of {{component}} (hello in this file) used for uploading the RPM file, delete 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 component: 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