在构建装有货物的板条箱时,SSL证书无效

在构建装有货物的板条箱时,SSL证书无效,ssl,github,rust,ssl-certificate,rust-cargo,Ssl,Github,Rust,Ssl Certificate,Rust Cargo,在定义依赖项(rand=“0.3.0”)后尝试教程中的一个示例(猜谜游戏)时,我得到了以下结论: $ cargo build --verbose Updating registry `https://github.com/rust-lang/crates.io-index` Unable to update registry https://github.com/rust-lang/crates.io-index Caused by: failed to fetch `https:

在定义依赖项(
rand=“0.3.0”
)后尝试教程中的一个示例(猜谜游戏)时,我得到了以下结论:

$ cargo build --verbose
    Updating registry `https://github.com/rust-lang/crates.io-index`
Unable to update registry https://github.com/rust-lang/crates.io-index

Caused by:
  failed to fetch `https://github.com/rust-lang/crates.io-index`

Caused by:
  [16] The SSL certificate is invalid
将此添加到cargo registry git repo,但未成功:

[http]
    sslVerify = false

在哪里挖掘?

如评论中所述,这可能是您和Github之间的某人修改了您的通信()或系统配置错误(如缺少证书)。(Github方面不太可能出现问题。)

先用普通git进行调试:
git克隆https://github.com/rust-lang/crates.io-index.git

要获取失败的详细信息,请使用
openssl s_client-debug-showcerts-connect github.com:443
,如果无法自行退出(因为连接工作正常),请按
CTRL-C
退出。输出包含有关远程设备提供了哪些证书以及如何验证或验证失败的信息


如果有人修改了您的通信,请发布此文件和一个
traceroute github.com
或类似文件的输出,以便其他人可以避免使用该提供商。

我今天遇到了同样的问题,发现我的
$HOME/.gitconfig
有以下问题:

[url "git@github.com:"]
    insteadOf = https://github.com/

我添加这个是为了让
go-get
通过SSH进行私有回购。对此进行注释修复了错误。

在github.com上收到SSL警告真奇怪。。。您是否使用SSL代理来破坏您的连接?我怀疑是我的提供商所为。问题是怎么做…@tuxdevo change provider,这绝对是互联网提供商不想要的行为。更重要的是,如果你的ISP修改了你的SSL证书,那么你就不能信任互联网上任何安全的东西。比如网上购物,或者银行。快跑。你也可以在网上的某个地方点名羞辱他们。这看起来像是忽略了SSL证书。