Step 2: In cargo

ARTIFACTORY: Configure Cargo Remote Repository

AuthorFullName__c
Md Mohsin Ali
articleNumber
000006135
FirstPublishedDate
2024-07-02T08:39:42Z
lastModifiedDate
2025-05-23
VersionNumber
1
  • Paste the copied configuration in the config.toml file, which generally is under ~/.cargo/config.toml (if not present, create one)
  • Perform cargo login as it will authenticate the cargo client against Artifactory
  • You will be asked to enter the Token that was generated in the Set Me Up section (Attached is the screenshot for reference). 
User-added image
Paste the token. Ex: Bearer <token>
$ cargo login
    Updating `artifactory` index
please paste the token found on https://crates.io/me below
Bearer <Token>
       Login token for `artifactory` saved

NOTE: For the latest versions of the cargo client, it is required to add the below line within the config.toml file to authenticate against Artifactory
[registry]
global-credential-providers = ["cargo:token"]
  • After successful login, we can start resolving cargo packages as below.
$ cargo add ratatui 
    Updating `artifactory-remote` index
      Adding ratatui v0.26.1 to dependencies.
             Features:
             + crossterm
             + underline-color
             - all-widgets
             - document-features
             - macros
             - serde
             - termion
             - termwiz
             - unstable
             - unstable-rendered-line-info
             - unstable-widget-ref
             - widget-calendar
    Updating `artifactory-remote` index