我该如何禁用cargo update
或cargo build
尝试访问github.com,但仍可从crates.io
下载适当的软件包。
我的cargo.toml中只有一个依赖项。
[dependencies]
chrono = "0.2.14"
运行cargo build
E:\>cargo build
Updating registry `https://github.com/rust-lang/crates.io-index`
Unable to update registry https://github.com/rust-lang/crates.io-index
在工作中,我们被阻止访问github.com,但可以访问crates.io。是否有一种选项,让Cargo可以在不更新其注册表的情况下仍然下载所需的软件包?