Step 1: In Artifactory

ARTIFACTORY: Configure Cargo Remote Repository

AuthorFullName__c
Md Mohsin Ali
articleNumber
000006135
FirstPublishedDate
2024-07-02T08:39:42Z
lastModifiedDate
2025-05-23
VersionNumber
1
  • Create a Cargo remote repository by logging in as Administrator
    • Administration Panel => Repositories => Repositories.
  • On the top right corner of the Repositories UI, 
    • Click Add  Repositories => Remote Repository
User-added image User-added image
  • After creating the Cargo remote repository, we need to configure it with our cargo client to start resolving cargo packages. To do that, Navigate to Application Panel => Artifactory => Artifacts => Search for [repoName] and Click Set Me Up.
User-added image
  • You will be prompted to enter your password.
    • Upon successful authentication, the configuration will be generated. 
    • Copy the generated configuration

Below is a sample configuration:
# Makes artifactory the default registry and saves passing --registry parameter
[registry]
default = "artifactory"

[registries.artifactory]
index = "sparse+https://<artURL>/artifactory/api/cargo/<repoName>/index/"

# Add these 2 sections for resolving dependencies from Artifactory
[source.artifactory-remote]
registry = "sparse+https://<artURL>/artifactory/api/cargo/<repoName>/index/"

[source.crates-io]
replace-with = "artifactory-remote"