crates.io has rate limiting and user agent restrictions according to
https://crates.io/data-access and poudriere servers hit this quickly,
e.g.:
fetch: https://crates.io/api/v1/crates/whoami/2.1.3/download?dummy=/rust/crates/whoami-2.1.3.crate: Forbidden
Solution taken from:
I would also recommend that you download the files directly from the
CDN instead of going through our API servers: e.g.
https://static.crates.io/crates/libc/0.2.185/download or
https://static.crates.io/crates/libc/libc-0.2.185.crate. That addresses
the rate limit concern mentioned in NixOS/nixpkgs#512735 (comment) since
the 1 req/sec limit only applies to our API servers.for completeness, the technically correct path for downloading crates
is: load https://index.crates.io/config.json, look at the dl key in the
JSON file, build the download URL via {dl}/{name}/{version}/download.