File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 14
14
</div >
15
15
16
16
<p >
17
- If you want to use package commands from the command line, you will need to
18
- login with <code >cargo login (token)</code > using one of the tokens listed below.
17
+ You can use the API tokens on this page to run <a href =" https://doc.rust-lang.org/cargo/" >cargo</a >
18
+ commands that need write access to crates.io. If you want to publish your own
19
+ crates then this is required.
19
20
</p >
21
+
20
22
<p >
21
- When working in shared environments, supplying the token on the command line could
22
- expose it to prying eyes. To avoid this, enter <code >cargo login</code > and supply your
23
- token when prompted.
23
+ Run <a href =" https://doc.rust-lang.org/cargo/commands/cargo-login.html" ><code >cargo login</code ></a >
24
+ on the command line to save the API token that you will use for local
25
+ development. For CI systems you can use the
26
+ <a href =" https://doc.rust-lang.org/cargo/reference/config.html?highlight=CARGO_REGISTRY_TOKEN#credentials" ><code >CARGO_REGISTRY_TOKEN</code ></a >
27
+ environment variable, but make sure that the token stays secret!
24
28
</p >
25
29
26
30
{{ #if this.newToken }}
You can’t perform that action at this time.
0 commit comments