- 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).
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