Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/rust/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Rust 如何指定用户名和密码从货物替代登记处下载板条箱?_Rust_Rust Cargo - Fatal编程技术网

Rust 如何指定用户名和密码从货物替代登记处下载板条箱?

Rust 如何指定用户名和密码从货物替代登记处下载板条箱?,rust,rust-cargo,Rust,Rust Cargo,我正在测试这个特性。如果板条箱支持HTTP基本身份验证,我如何使Cargo能够下载板条箱 根据,我必须提供以下两种货物/凭证: [registries.my-registry] user = "tim" password = "topsecret" 使用curl测试它效果很好: #curl-u tim:topsecrethttps://my.registry/api/v1/crates/krate/0.1.0/download 警告:二进制输出可能会弄乱终端。 但是,Cargo会得到所需的身

我正在测试这个特性。如果板条箱支持HTTP基本身份验证,我如何使Cargo能够下载板条箱

根据,我必须提供以下两种货物/凭证:

[registries.my-registry]
user = "tim"
password = "topsecret"
使用curl测试它效果很好:

#curl-u tim:topsecrethttps://my.registry/api/v1/crates/krate/0.1.0/download
警告:二进制输出可能会弄乱终端。
但是,Cargo会得到
所需的身份验证
响应:

错误:无法从下载`https://my.registry/api/v1/crates/krate/0.1.0/download`
原因:
未能从中获取200个响应`https://my.registry/api/v1/crates/krate/0.1.0/download`,得到401