1CARGO-LOGIN(1)                                                  CARGO-LOGIN(1)
2
3
4

NAME

6       cargo-login - Save an API token from the registry locally
7

SYNOPSIS

9       cargo login [OPTIONS] [TOKEN]
10

DESCRIPTION

12       This command will save the API token to disk so that commands that
13       require authentication, such as cargo-publish(1), will be automatically
14       authenticated. The token is saved in $CARGO_HOME/credentials.
15       CARGO_HOME defaults to .cargo in your home directory.
16
17       If the TOKEN argument is not specified, it will be read from stdin.
18
19       The API token for crates.io may be retrieved from https://crates.io/me.
20
21       Take care to keep the token secret, it should not be shared with anyone
22       else.
23

OPTIONS

25   Login Options
26       --registry REGISTRY
27           Name of the registry to use. Registry names are defined in Cargo
28           config files
29           <https://doc.rust-lang.org/cargo/reference/config.html>. If not
30           specified, the default registry is used, which is defined by the
31           registry.default config key which defaults to crates-io.
32
33   Display Options
34       -v, --verbose
35           Use verbose output. May be specified twice for "very verbose"
36           output which includes extra output such as dependency warnings and
37           build script output. May also be specified with the term.verbose
38           config value
39           <https://doc.rust-lang.org/cargo/reference/config.html>.
40
41       -q, --quiet
42           No output printed to stdout.
43
44       --color WHEN
45           Control when colored output is used. Valid values:
46
47           ·   auto (default): Automatically detect if color support is
48               available on the terminal.
49
50           ·   always: Always display colors.
51
52           ·   never: Never display colors.
53
54           May also be specified with the term.color config value
55           <https://doc.rust-lang.org/cargo/reference/config.html>.
56
57   Common Options
58       -h, --help
59           Prints help information.
60
61       -Z FLAG...
62           Unstable (nightly-only) flags to Cargo. Run cargo -Z help for
63           details.
64

ENVIRONMENT

66       See the reference
67       <https://doc.rust-lang.org/cargo/reference/environment-variables.html>
68       for details on environment variables that Cargo reads.
69

EXIT STATUS

71       0
72           Cargo succeeded.
73
74       101
75           Cargo failed to complete.
76

EXAMPLES

78        1. Save the API token to disk:
79
80               cargo login
81

SEE ALSO

83       cargo(1), cargo-publish(1)
84
85
86
87                                  2019-06-03                    CARGO-LOGIN(1)
Impressum