配置路径 ~/.cargo/config
[source.crates-io]
registry = "https://github.com/rust-lang/crates.io-index"
replace-with = 'ustc'
[source.ustc]
registry = "git://mirrors.ustc.edu.cn/crates.io-index"
# 如果所处的环境中不允许使用 git 协议,可以把上面的地址改为
# registry = "https://mirrors.ustc.edu.cn/crates.io-index"
[http]
# 解决 SSL connect error
check-revoke = false
[source.crates-io]
replace-with = 'ustc'
[source.ustc]
# registry = "git://mirrors.ustc.edu.cn/crates.io-index"
registry = "https://mirrors.ustc.edu.cn/crates.io-index"
[http]
check-revoke = false
https://zhuanlan.zhihu.com/p/74875840
https://www.cnblogs.com/gelare/p/12912483.html
版权属于:wshon
本文链接:https://blog.wshon.com/2020/07/cargo-mirror.html
转载时须注明出处及本声明
最新回复