<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>05-发布命令 on 编程那些事儿</title><link>https://before80.github.io/prgms/Rust/cargo/cargo-commands/publishing-commands/</link><description>Recent content in 05-发布命令 on 编程那些事儿</description><generator>Hugo</generator><language>zh-cn</language><lastBuildDate>Tue, 11 Aug 2026 23:57:44 +0800</lastBuildDate><atom:link href="https://before80.github.io/prgms/Rust/cargo/cargo-commands/publishing-commands/index.xml" rel="self" type="application/rss+xml"/><item><title>01-cargo login</title><link>https://before80.github.io/prgms/Rust/cargo/cargo-commands/publishing-commands/01-cargo-login/</link><pubDate>Thu, 30 Jul 2026 14:49:00 +0800</pubDate><guid>https://before80.github.io/prgms/Rust/cargo/cargo-commands/publishing-commands/01-cargo-login/</guid><description>&lt;blockquote&gt;
&lt;p&gt;译文 · 基于 &lt;a href="https://doc.rust-lang.org/cargo/"&gt;The Cargo Book&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1 id="cargo-login1"&gt;cargo-login(1)&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;原文链接: &lt;a href="https://doc.rust-lang.org/cargo/commands/cargo-login.html"&gt;https://doc.rust-lang.org/cargo/commands/cargo-login.html&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="name"&gt;名称&lt;/h2&gt;
&lt;p&gt;cargo-login &amp;mdash; 登录到注册表&lt;/p&gt;
&lt;h2 id="synopsis"&gt;大纲&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;cargo login&lt;/code&gt; [&lt;em&gt;options&lt;/em&gt;] [&lt;code&gt;--&lt;/code&gt; &lt;em&gt;args&lt;/em&gt;]&lt;/p&gt;
&lt;h2 id="description"&gt;描述&lt;/h2&gt;
&lt;p&gt;此命令会运行凭证提供者保存令牌，以便需要身份验证的命令
（如 &lt;a href="../05-cargo-publish/"&gt;cargo-publish(1)&lt;/a&gt;）能够
自动完成身份验证。&lt;/p&gt;
&lt;p&gt;双破折号（&lt;code&gt;--&lt;/code&gt;）之后的所有参数都会传给凭证提供者。&lt;/p&gt;</description></item><item><title>02-cargo logout</title><link>https://before80.github.io/prgms/Rust/cargo/cargo-commands/publishing-commands/02-cargo-logout/</link><pubDate>Thu, 30 Jul 2026 14:49:00 +0800</pubDate><guid>https://before80.github.io/prgms/Rust/cargo/cargo-commands/publishing-commands/02-cargo-logout/</guid><description>&lt;blockquote&gt;
&lt;p&gt;译文 · 基于 &lt;a href="https://doc.rust-lang.org/cargo/"&gt;The Cargo Book&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1 id="cargo-logout1"&gt;cargo-logout(1)&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;原文链接: &lt;a href="https://doc.rust-lang.org/cargo/commands/cargo-logout.html"&gt;https://doc.rust-lang.org/cargo/commands/cargo-logout.html&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="name"&gt;名称&lt;/h2&gt;
&lt;p&gt;cargo-logout &amp;mdash; 在本地从注册表移除 API 令牌&lt;/p&gt;
&lt;h2 id="synopsis"&gt;大纲&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;cargo logout&lt;/code&gt; [&lt;em&gt;options&lt;/em&gt;]&lt;/p&gt;
&lt;h2 id="description"&gt;描述&lt;/h2&gt;
&lt;p&gt;此命令会运行凭证提供者移除已保存的令牌。&lt;/p&gt;
&lt;p&gt;对于默认的 &lt;code&gt;cargo:token&lt;/code&gt; 凭证提供者，凭证存储在
&lt;code&gt;$CARGO_HOME/credentials.toml&lt;/code&gt; 中，其中 &lt;code&gt;$CARGO_HOME&lt;/code&gt; 默认为你主目录下的 &lt;code&gt;.cargo&lt;/code&gt;。&lt;/p&gt;</description></item><item><title>03-cargo owner</title><link>https://before80.github.io/prgms/Rust/cargo/cargo-commands/publishing-commands/03-cargo-owner/</link><pubDate>Thu, 30 Jul 2026 14:49:00 +0800</pubDate><guid>https://before80.github.io/prgms/Rust/cargo/cargo-commands/publishing-commands/03-cargo-owner/</guid><description>&lt;blockquote&gt;
&lt;p&gt;译文 · 基于 &lt;a href="https://doc.rust-lang.org/cargo/"&gt;The Cargo Book&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1 id="cargo-owner1"&gt;cargo-owner(1)&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;原文链接: &lt;a href="https://doc.rust-lang.org/cargo/commands/cargo-owner.html"&gt;https://doc.rust-lang.org/cargo/commands/cargo-owner.html&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="name"&gt;名称&lt;/h2&gt;
&lt;p&gt;cargo-owner &amp;mdash; 管理注册表上某个 crate 的所有者&lt;/p&gt;
&lt;h2 id="synopsis"&gt;大纲&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;cargo owner&lt;/code&gt; [&lt;em&gt;options&lt;/em&gt;] &lt;code&gt;--add&lt;/code&gt; &lt;em&gt;login&lt;/em&gt; [&lt;em&gt;crate&lt;/em&gt;]&lt;br&gt;
&lt;code&gt;cargo owner&lt;/code&gt; [&lt;em&gt;options&lt;/em&gt;] &lt;code&gt;--remove&lt;/code&gt; &lt;em&gt;login&lt;/em&gt; [&lt;em&gt;crate&lt;/em&gt;]&lt;br&gt;
&lt;code&gt;cargo owner&lt;/code&gt; [&lt;em&gt;options&lt;/em&gt;] &lt;code&gt;--list&lt;/code&gt; [&lt;em&gt;crate&lt;/em&gt;]&lt;/p&gt;
&lt;h2 id="description"&gt;描述&lt;/h2&gt;
&lt;p&gt;此命令会修改注册表上某个 crate 的所有者。crate 的所有者可以上传新版本并 yank 旧版本。
非团队所有者还可以修改所有者集合，请谨慎操作！&lt;/p&gt;</description></item><item><title>04-cargo package</title><link>https://before80.github.io/prgms/Rust/cargo/cargo-commands/publishing-commands/04-cargo-package/</link><pubDate>Thu, 30 Jul 2026 14:49:00 +0800</pubDate><guid>https://before80.github.io/prgms/Rust/cargo/cargo-commands/publishing-commands/04-cargo-package/</guid><description>&lt;blockquote&gt;
&lt;p&gt;译文 · 基于 &lt;a href="https://doc.rust-lang.org/cargo/"&gt;The Cargo Book&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1 id="cargo-package1"&gt;cargo-package(1)&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;原文链接: &lt;a href="https://doc.rust-lang.org/cargo/commands/cargo-package.html"&gt;https://doc.rust-lang.org/cargo/commands/cargo-package.html&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="name"&gt;名称&lt;/h2&gt;
&lt;p&gt;cargo-package &amp;mdash; 将本地包组装为可分发压缩包&lt;/p&gt;
&lt;h2 id="synopsis"&gt;大纲&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;cargo package&lt;/code&gt; [&lt;em&gt;options&lt;/em&gt;]&lt;/p&gt;
&lt;h2 id="description"&gt;描述&lt;/h2&gt;
&lt;p&gt;此命令会为当前目录中的包创建可分发、压缩的 &lt;code&gt;.crate&lt;/code&gt; 文件（含源代码）。生成的文件保存在 &lt;code&gt;target/package&lt;/code&gt; 目录中。执行步骤如下：&lt;/p&gt;</description></item><item><title>05-cargo publish</title><link>https://before80.github.io/prgms/Rust/cargo/cargo-commands/publishing-commands/05-cargo-publish/</link><pubDate>Thu, 30 Jul 2026 14:49:00 +0800</pubDate><guid>https://before80.github.io/prgms/Rust/cargo/cargo-commands/publishing-commands/05-cargo-publish/</guid><description>&lt;blockquote&gt;
&lt;p&gt;译文 · 基于 &lt;a href="https://doc.rust-lang.org/cargo/"&gt;The Cargo Book&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1 id="cargo-publish1"&gt;cargo-publish(1)&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;原文链接: &lt;a href="https://doc.rust-lang.org/cargo/commands/cargo-publish.html"&gt;https://doc.rust-lang.org/cargo/commands/cargo-publish.html&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="name"&gt;名称&lt;/h2&gt;
&lt;p&gt;cargo-publish &amp;mdash; 将包上传到注册表&lt;/p&gt;
&lt;h2 id="synopsis"&gt;大纲&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;cargo publish&lt;/code&gt; [&lt;em&gt;options&lt;/em&gt;]&lt;/p&gt;
&lt;h2 id="description"&gt;描述&lt;/h2&gt;
&lt;p&gt;此命令会为当前目录中的包创建可分发、压缩的 &lt;code&gt;.crate&lt;/code&gt; 文件（含源代码），并将其上传到注册表。默认注册表为 &lt;a href="https://crates.io"&gt;https://crates.io&lt;/a&gt;。执行步骤如下：&lt;/p&gt;</description></item><item><title>06-cargo yank</title><link>https://before80.github.io/prgms/Rust/cargo/cargo-commands/publishing-commands/06-cargo-yank/</link><pubDate>Thu, 30 Jul 2026 14:49:00 +0800</pubDate><guid>https://before80.github.io/prgms/Rust/cargo/cargo-commands/publishing-commands/06-cargo-yank/</guid><description>&lt;blockquote&gt;
&lt;p&gt;译文 · 基于 &lt;a href="https://doc.rust-lang.org/cargo/"&gt;The Cargo Book&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1 id="cargo-yank1"&gt;cargo-yank(1)&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;原文链接: &lt;a href="https://doc.rust-lang.org/cargo/commands/cargo-yank.html"&gt;https://doc.rust-lang.org/cargo/commands/cargo-yank.html&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="name"&gt;名称&lt;/h2&gt;
&lt;p&gt;cargo-yank &amp;mdash; 从索引中移除已推送的 crate&lt;/p&gt;
&lt;h2 id="synopsis"&gt;大纲&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;cargo yank&lt;/code&gt; [&lt;em&gt;options&lt;/em&gt;] &lt;em&gt;crate&lt;/em&gt;@&lt;em&gt;version&lt;/em&gt;&lt;br&gt;
&lt;code&gt;cargo yank&lt;/code&gt; [&lt;em&gt;options&lt;/em&gt;] &lt;code&gt;--version&lt;/code&gt; &lt;em&gt;version&lt;/em&gt; [&lt;em&gt;crate&lt;/em&gt;]&lt;/p&gt;
&lt;h2 id="description"&gt;描述&lt;/h2&gt;
&lt;p&gt;yank 命令从服务器索引中移除先前发布的 crate 版本。此命令不删除任何数据，
该 crate 仍可通过注册表的下载链接下载。&lt;/p&gt;</description></item></channel></rss>