- 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
- Select Package type as Cargo
- Update URL & Registry URL as [https://index.crates.io]
- 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.
- 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"