Uploading and Downloading a Conda Package via the Client
CodeArts Artifact can connect to local Conda clients. You may upload your private packages from your local Conda client to self-hosted repos and share them with others, who can download these Conda packages through their clients.
Conda Package
Conda is an open-source package manager and environment management system widely used in scientific computing, data science, and machine learning. It supports Windows, macOS, and Linux, and manages packages for Python and other languages such as R, Java, and C++. Conda artifacts are packages published via Conda.
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 installed the Conda client.
- You have created a Conda 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 Conda Package via the Client
- Access self-hosted repos using your Huawei Cloud account.
- Select the target Conda repository on the self-hosted repo page.
- Click Tutorial on the right of the page.
- In the displayed dialog box, click Download Configuration File to download the condarc file.
- Upload the Conda package to the repository.
curl -k -u "<USERNAME>:<PASSWORD>" -X PUT <REPO_URL>/<FILE_PATH>" -T <PACKAGE_NAME>
- FILE_PATH: path (including the name) of the Conda repository to be uploaded.
- PACKAGE_NAME: path (including the name) of the local Conda package.
- Obtain the values of USERNAME, PASSWORD, and REPO_URL from the downloaded condarc file in 4. In the condarc file, the values are provided in channels, in the https://<USERNAME>:<PASSWORD>@<REPO_URL> format. The value of PASSWORD must be decoded in the URL encoding format, as shown below.

Downloading a Conda Package via the Client
- Access self-hosted repos using your Huawei Cloud account.
- Select the target Conda repository on the self-hosted repo page.
- Click Tutorial on the right of the page.
- In the displayed dialog box, click Download Configuration File to download the condarc file.
- Download the package via the client.
conda install {package name}In an offline development environment, the repo.anaconda.com repository is inaccessible.
Edit the hosts file and enter the IP address of the repository's independent domain name, as shown in the figure.

package name: path parameter in the Uploading a Conda Package via the Client.
To ignore the certificate, set ssl_verify to false in the configuration file.
The following figure shows that the download is successful.

Common problems
- If the package exists in the repository but fails to be downloaded, update Conda to the latest version.
- If the installation prints the default official channel instead of the expected one, edit the .condarc file in C:\Users\{user}\AppData\Local\anaconda3.


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