更新注册表`https:// example.com /`

アレッ*_*ックス 5 rust

正如https://github.com/DaGenix/rust-crypto所说,我将此添加到我的rust-lib项目中:

//Cargo.toml
[dependencies]
rust-crypto = "*"

//lib.rs
extern crate "rust-crypto" as rust_crypto;
Run Code Online (Sandbox Code Playgroud)

得到了这个:

$ cargo build --verbose
    Updating registry `https://example.com/`
Unable to update the package registry

Caused by:
  failed to fetch `https://example.com/`

Caused by:
  [16] hostname does not match certificate
Run Code Online (Sandbox Code Playgroud)

没有"example.com"既不是我的项目,也不是他的lib.

Ste*_*nik 2

我不确定你为什么被否决。

当注册表设置为 example.com 时,您可能只有较旧的 Cargo。您上次安装它是什么时候?

另请参阅:此 reddit 线程http://www.reddit.com/r/rust/comments/2mywa1/cargo_update_error_on_registry_httpsexamplecom/