To deploy a package using a cURL request.
Deploying Cargo Crates
curl -uadmin:password -XPUT "http://localhost:8082/artifactory/cargo-local/crates/package-1.0.0.crate" -T package-1.0.0.crate
When deploying directly (PUT request to a specific path), make sure the target path is a valid Cargo path.
crates/{package_name}/{package_name}-{version}.crate
Note that deploying a package to a different path will not identify the package as Cargo package, and will not invoke metadata indexing.
Also, as Artifactory relies on the information in the cargo.toml
file, make sure that it contains the dependencies' registry URLs, if applicable. If you are not sure, it is always recommended to use the cargo publish command.