gpt4 book ai didi

ssl - 构建带 cargo 的箱子时 SSL 证书无效

转载 作者:行者123 更新时间:2023-11-29 07:48:55 25 4
gpt4 key购买 nike

在定义依赖项 (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 注册表 git 存储库,但没有成功:

[http]
sslVerify = false

去哪里挖?

最佳答案

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

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

我添加这个是为了让 go get 通过 SSH 为私有(private) repos 工作。注释掉这个错误。

关于ssl - 构建带 cargo 的箱子时 SSL 证书无效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30368027/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com