Authenticated Downloads: Configuration
Shipyard.rs requires authorization for all crate downloads, unlike how crates.io works.
This page contains instructions for configuring ~/.cargo/config.toml
. For additional discussion about cargo
authentication, see the Authentication secion.
Configuring A Credential Provider (Rust 1.74 or Newer)
Example config:
# ~/.cargo/config.toml
[registry]
global-credential-providers = ["cargo:token"]
Additional details here.
Via User-Agent (Older Rust Versions)
For versions of Rust prior to 1.74, we provide a workaround for authentication.
Example of using cargo
's "user-agent" setting to pass an auth token (see Temporary Fix) -
would be written to $CARGO_HOME/config.toml
or other configuration path:
# set a custom user-agent header value for cargo requests:
[http]
user-agent = "shipyard AxzHJS6gWK="
# this setting, while facially unrelated and not strictly required for performing
# authentication # via the "user-agent" header, seems to mitigate various problems
# that arise from using the "user-agent" # header in a ... non-traditional way
[net]
git-fetch-with-cli = true