หน้านี้ยังไม่พร้อมใช้งานในภาษาท้องถิ่นของคุณ เรากำลังพยายามอย่างหนักเพื่อเพิ่มเวอร์ชันภาษาอื่น ๆ เพิ่มเติม ขอบคุณสำหรับการสนับสนุนเสมอมา

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ CodeArts Artifact/ User Guide/ Self-Hosted Repos 2.0/ Uploading/Downloading Components on the Client/ Downloading Components from Self-Hosted Repos on the Client

Downloading Components from Self-Hosted Repos on the Client

Updated on 2024-10-16 GMT+08:00

Downloading a Maven Component on the Client

  • The client tool is Maven. Ensure that the JDK and Maven have been installed.

    1. Download the settings.xml file from the self-hosted repo page and replace the downloaded configuration file with the new one or modify the settings.xml file of Maven as prompted.

    2. Run the following commands to download the client:
    mvn dependency:get -DremoteRepositories={repo_url} -DgroupId={groupId} -DartifactId={artifactId} -Dversion={version} -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true

Downloading an npm Component on the Client

  • The client tool is npm. Ensure that node.js (or io.js) and npm have been installed.

    1. Download the NPMRC file from the self-hosted repo page and save the downloaded NPMRC file as an .npmrc file.

    2. Copy the file to the user directory. In Linux, the path is ~/.npmrc. In Windows, the path is C:\Users\<UserName>\.npmrc.

    3. Go to the npm project directory (where the package.json file is stored) and run the following commands to download the npm dependency component:
    npm config set strict-ssl false
    npm install ––verbose

Downloading a PyPI Component on the Client

  • The client tools are python and pip. Ensure that python and pip have been installed.

    1. Download the pip.ini file from the self-hosted repo page and copy the file to the user directory. In Linux, the path is ~/.pip/pip.conf (C:\Users\<UserName>\pip\pip.ini on Windows)

    2. Run the following command to install Python:
    pip install {package name}

Downloading a Go Component on the Client

Certificate verification cannot be bypassed on the Go client. You need to add the domain name certificate corresponding to the self-hosted repo to the local certificate trust list and perform the following steps to add the trust certificate:

  1. Export the certificates.
    openssl s_client -connect {host}:443 -showcerts </dev/null 2>/dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' |openssl x509 -outform PEM >mycertfile.pem
    openssl x509 -outform der -in mycertfile.pem -out mycertfile.crt

    mycertfile.pem and mycertfile.crt are the downloaded certificates.

  2. Add the certificates to the root certificate trust list.
  3. Run the go commands to download the dependency package.
    ##1. Packages of versions earlier than v2.0
    go get -v <moudlename>
    ##2. v2.0 and later versions
    ##a. The ZIP package contains go.mod and the path ends with /vN.
    go get -v {{moduleName}}/vN@{{version}}
    ##b. The ZIP package does not contain go.mod or the first line in go.mod does not end with /vN.
    go get -v {moduleName}}@{{version}}+incompatible

Downloading an RPM Component on the Client

The following section uses the RPM component from Uploading an RPM Component on the Client as an example to describe how to obtain dependency packages from the RPM repository.

  1. Download the RPM configuration file by referring to 2 and 3.
  2. 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.
  3. Save the modified configuration file to the /etc/yum.repos.d/ directory on the Linux host.

  4. Run the following command to download the RPM component: Replace hello with the actual value of component.

    yum install hello

Downloading a Conan Component on the Client

  1. Select the target Conan repository from the self-hosted repo page and click Tutorial on the right to download the configuration file.

    You can replace local Conan configurations with the obtained configuration file (the path is ~/.conan/remotes.json in Linux or C:\Users\<UserName>\.conan\remotes.json in Windows).

  2. Run the following commands to download the Conan dependency package from the remote repository.

    $ conan install ${package_name}/${package_version}@${package_username}/${channel} -r=cloud_artifact

  3. Run the following command to check the downloaded Conan software package.

    $ conan search "*"

  4. Run the following commands to remove the software package from the local cache.

    $ conan remove ${package_name}/${package_version}@${package_username}/${channel}

Downloading a NuGet Component on the Client

Ensure that you have installed the NuGet.

  1. Select the target NuGet repository from the self-hosted repo page and click Tutorial on the right to download the configuration file NuGet.txt.

  2. Open the file, find the command under NuGet add source, and add the source.

    ##----------------------NuGet add source----------------------##
    nuget sources add -name {repo_name} -source{repo_url} -username {user_name} -password {repo_password}

  3. Open the file, find the statement under NuGet Download, replace <PACKAGE> with the name of the component to be downloaded, and run the download statement. (If a configuration source exists, use the configured source name as the parameter following -source.)

    ##----------------------NuGet Download----------------------##
    nuget install <PACKAGE>

Downloading a .NET Component on the Client

Ensure that you have installed the .NET.

  1. Select the target NuGet repository from the self-hosted repo page and click Tutorial on the right to download the configuration file dotnet.txt.

  2. Open the configuration file, find the command under dotnet add source, and add the source.

    ##----------------------dotnet add source----------------------##
    dotnet nuget add source {repo_url} add -n {repo_name} -u {user_name} -p {repo_password}

  3. Find the statement under dotnet download, replace < PACKAGE > with the name of the component to be downloaded, and run the download statement.

    ##----------------------dotnet download----------------------##
    dotnet add package <PACKAGE>

Downloading a Docker Component on the Client

Prerequisites

  • You have installed the Docker client.
  • You have created a Docker repository in the self-hosted repo.
  • Run the following commands on the Docker client to modify the configuration and ignore the certificate:
    vi /etc/docker/daemon.json
    {
      "insecure-registries": ["url"] 
    }

    {url}: repository path, as shown in the following figure.

    Downloading a Docker component on the client

    Run the following command on the local client to download the Docker component:

    sudo docker pull {url}/${image_name}:${image_version}

    url: repository path.

    image_name: component name.

    image_version: component version.

Downloading a CocoaPods Component on the Client

Prerequisites

  • You have installed the Ruby client and cocoapods-art plug-in.
  • You have created a CocoaPods repository in the self-hosted repo.

Downloading the provided configuration file to download CocoaPods components

  1. Select the target CocoaPods repository from the self-hosted repo page and click Tutorial on the right of the page.
  2. Select Download the provided configuration file.
  3. In the Select purpose area, click Download.
  4. Run the following commands to download the local client:

    Run the following command to download the component from the remote repository:

    pod repo-art add {package_name} {url}

    package_name: name of the CocoaPods dependency package to be downloaded.

    url: repository path of the self-hosted repo.

    Run the following command to change the path of the CocoaPods repository:

    pod repo-art update {package_name} {url}

    package_name: The CocoaPods dependency package cannot be modified.

    url: enter the repository path of the target self-hosted repo.

    Run the following command to display the downloaded components.

    pod repo-art list

    Run the following command to remove the local dependency package.

    pod repo-art remove <repo-name>//repo_name: name of the CocoaPods dependency package.

Following the command line configuration to download the CocoaPods components

  1. Select the target CocoaPods repository from the self-hosted repo page and click Tutorial on the right of the page.
  2. Select Follow the command line configuration.
  3. Run the following command to check whether the Rudy client has been installed:

    rudy -v

  4. Run the following command to install the cocoapods-art plug-in:

    sudo gem install cocoapods-art

  5. Run the following command to add the self-hosted repo to your CocoaPods client.

    pod repo-art add <repo_name> "{url}"

    repo_name: name of the folder for storing components of self-hosted repos on the local client.

    url: repository path of the CocoaPods repository.

  6. In the Select purpose area, click Download.
  7. Run the following commands to download the local client:

    Run the following command to download the component from the remote repository:

    pod repo-art update {package_name}//package_name: component name.

    Run the following command to display the downloaded components.

    pod repo-art list

    Run the following command to remove the local dependency package.

    pod repo-art remove <repo-name>//repo-name: name of the CocoaPods dependency package

เราใช้คุกกี้เพื่อปรับปรุงไซต์และประสบการณ์การใช้ของคุณ การเรียกดูเว็บไซต์ของเราต่อแสดงว่าคุณยอมรับนโยบายคุกกี้ของเรา เรียนรู้เพิ่มเติม

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback