fork/cargo
git clone https://git.julia.blue/fork/cargo
9eda47ee0
0.89.0
1CARGO-LOGIN(1) 2 3NAME 4 cargo-login — Log in to a registry 5 6SYNOPSIS 7 cargo login [options] [-- args] 8 9DESCRIPTION 10 This command will run a credential provider to save a token so that 11 commands that require authentication, such as cargo-publish(1), will be 12 automatically authenticated. 13 14 All the arguments following the two dashes (--) are passed to the 15 credential provider. 16 17 For the default cargo:token credential provider, the token is saved in 18 $CARGO_HOME/credentials.toml. CARGO_HOME defaults to .cargo in your home 19 directory. 20 21 If a registry has a credential-provider specified, it will be used. 22 Otherwise, the providers from the config value 23 registry.global-credential-providers will be attempted, starting from 24 the end of the list. 25 26 The token will be read from stdin. 27 28 The API token for crates.io may be retrieved from 29 <https://crates.io/me>. 30 31 Take care to keep the token secret, it should not be shared with anyone 32 else. 33 34OPTIONS 35 Login Options 36 --registry registry 37 Name of the registry to use. Registry names are defined in Cargo 38 config files 39 <https://doc.rust-lang.org/cargo/reference/config.html>. If not 40 specified, the default registry is used, which is defined by the 41 registry.default config key which defaults to crates-io. 42 43 Display Options 44 -v, --verbose 45 Use verbose output. May be specified twice for “very verbose” 46 output which includes extra output such as dependency warnings and 47 build script output. May also be specified with the term.verbose 48 config value 49 <https://doc.rust-lang.org/cargo/reference/config.html>. 50 51 -q, --quiet 52 Do not print cargo log messages. May also be specified with the 53 term.quiet config value 54 <https://doc.rust-lang.org/cargo/reference/config.html>. 55 56 --color when 57 Control when colored output is used. Valid values: 58 59 o auto (default): Automatically detect if color support is 60 available on the terminal. 61 62 o always: Always display colors. 63 64 o never: Never display colors. 65 66 May also be specified with the term.color config value 67 <https://doc.rust-lang.org/cargo/reference/config.html>. 68 69 Common Options 70 +toolchain 71 If Cargo has been installed with rustup, and the first argument to 72 cargo begins with +, it will be interpreted as a rustup toolchain 73 name (such as +stable or +nightly). See the rustup documentation 74 <https://rust-lang.github.io/rustup/overrides.html> for more 75 information about how toolchain overrides work. 76 77 --config KEY=VALUE or PATH 78 Overrides a Cargo configuration value. The argument should be in 79 TOML syntax of KEY=VALUE, or provided as a path to an extra 80 configuration file. This flag may be specified multiple times. See 81 the command-line overrides section 82 <https://doc.rust-lang.org/cargo/reference/config.html#command-line-overrides> 83 for more information. 84 85 -C PATH 86 Changes the current working directory before executing any specified 87 operations. This affects things like where cargo looks by default 88 for the project manifest (Cargo.toml), as well as the directories 89 searched for discovering .cargo/config.toml, for example. This 90 option must appear before the command name, for example cargo -C 91 path/to/my-project build. 92 93 This option is only available on the nightly channel 94 <https://doc.rust-lang.org/book/appendix-07-nightly-rust.html> and 95 requires the -Z unstable-options flag to enable (see #10098 96 <https://github.com/rust-lang/cargo/issues/10098>). 97 98 -h, --help 99 Prints help information. 100 101 -Z flag 102 Unstable (nightly-only) flags to Cargo. Run cargo -Z help for 103 details. 104 105ENVIRONMENT 106 See the reference 107 <https://doc.rust-lang.org/cargo/reference/environment-variables.html> 108 for details on environment variables that Cargo reads. 109 110EXIT STATUS 111 o 0: Cargo succeeded. 112 113 o 101: Cargo failed to complete. 114 115EXAMPLES 116 1. Save the token for the default registry: 117 118 cargo login 119 120 2. Save the token for a specific registry: 121 122 cargo login --registry my-registry 123 124SEE ALSO 125 cargo(1), cargo-logout(1), cargo-publish(1) 126