[记]Rust上传库到crates.io失败的解决办法参考
1.SSL验证失败
fatal: unable to access 'https://github.com/rust-lang/crates.io-index/': OpenSSL SSL_read: Connection was reset, errno 10054
取消git的SSL验证
git config --global http.sslVerify "false"
2.由于网络原因的超时
fatal: unable to access 'https://github.com/rust-lang/crates.io-index/': Failed to connect to github.com port 443 after 21408 ms: Timed out
取消http传输方式
git config --global --unset http.proxy
---上传成功
PS D:\rrss\iii> cargo publish --registry crates-io Updating crates.io index Packaging iii v0.1.2 (D:\rrss\iii) Verifying iii v0.1.2 (D:\rrss\iii) warning: only one of `license` or `license-file` is necessary `license` should be used if the package license can be expressed with a standard SPDX expression. `license-file` should be used if the package uses a non-standard license. See https://doc.rust-lang.org/cargo/reference/manifest.html#the-license-and-license-file-fields for more information. Compiling iii v0.1.2 (D:\rrss\iii\target\package\iii-0.1.2) warning: unused import: `Read` --> src\lib.rs:2:15 | 2 | use std::io::{Read,Write, BufReader, BufRead}; | ^^^^ | = note: `#[warn(unused_imports)]` on by default warning: method `Loadfromiii` should have a snake case name --> src\lib.rs:18:12 | 18 | pub fn Loadfromiii(filepath:&'static str)->Self{ | ^^^^^^^^^^^ help: convert the identifier to snake case: `loadfromiii` | = note: `#[warn(non_snake_case)]` on by default warning: unused `Result` that must be used --> src\lib.rs:52:13 | 52 | f.write(bufstr.as_bytes()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: this `Result` may be an `Err` variant, which should be handled = note: `#[warn(unused_must_use)]` on by default warning: `iii` (lib) generated 3 warnings Finished dev [unoptimized + debuginfo] target(s) in 6.03s Packaged 10 files, 7.6KiB (3.3KiB compressed) Uploading iii v0.1.2 (D:\rrss\iii) Updating crates.io index Waiting on `iii` to propagate to crates.io index (ctrl-c to wait asynchronously) Updating crates.io index Updating crates.io index Updating crates.io index Updating crates.io index Updating crates.io index Updating crates.io index
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· 没有源码,如何修改代码逻辑?
· PowerShell开发游戏 · 打蜜蜂
· 在鹅厂做java开发是什么体验
· WPF到Web的无缝过渡:英雄联盟客户端的OpenSilver迁移实战