Matthew Maurer | bd39854 | 2019-09-05 16:25:08 -0700 | [diff] [blame] | 1 | '\" t |
| 2 | .\" Title: cargo-login |
| 3 | .\" Author: [see the "AUTHOR(S)" section] |
| 4 | .\" Generator: Asciidoctor 1.5.8 |
| 5 | .\" Date: 2019-01-23 |
| 6 | .\" Manual: \ \& |
| 7 | .\" Source: \ \& |
| 8 | .\" Language: English |
| 9 | .\" |
| 10 | .TH "CARGO\-LOGIN" "1" "2019-01-23" "\ \&" "\ \&" |
| 11 | .ie \n(.g .ds Aq \(aq |
| 12 | .el .ds Aq ' |
| 13 | .ss \n[.ss] 0 |
| 14 | .nh |
| 15 | .ad l |
| 16 | .de URL |
| 17 | \fI\\$2\fP <\\$1>\\$3 |
| 18 | .. |
| 19 | .als MTO URL |
| 20 | .if \n[.g] \{\ |
| 21 | . mso www.tmac |
| 22 | . am URL |
| 23 | . ad l |
| 24 | . . |
| 25 | . am MTO |
| 26 | . ad l |
| 27 | . . |
| 28 | . LINKSTYLE blue R < > |
| 29 | .\} |
| 30 | .SH "NAME" |
| 31 | cargo\-login \- Save an API token from the registry locally |
| 32 | .SH "SYNOPSIS" |
| 33 | .sp |
| 34 | \fBcargo login [\fIOPTIONS\fP] [\fITOKEN\fP]\fP |
| 35 | .SH "DESCRIPTION" |
| 36 | .sp |
| 37 | This command will save the API token to disk so that commands that require |
| 38 | authentication, such as \fBcargo\-publish\fP(1), will be automatically |
| 39 | authenticated. The token is saved in \fB$CARGO_HOME/credentials\fP. \fBCARGO_HOME\fP |
| 40 | defaults to \fB.cargo\fP in your home directory. |
| 41 | .sp |
| 42 | If the \fITOKEN\fP argument is not specified, it will be read from stdin. |
| 43 | .sp |
| 44 | The API token for crates.io may be retrieved from \c |
| 45 | .URL "https://crates.io/me" "" "." |
| 46 | .sp |
| 47 | Take care to keep the token secret, it should not be shared with anyone else. |
| 48 | .SH "OPTIONS" |
| 49 | .SS "Login Options" |
| 50 | .sp |
| 51 | \fB\-\-registry\fP \fIREGISTRY\fP |
| 52 | .RS 4 |
| 53 | Name of the registry to use. Registry names are defined in \c |
| 54 | .URL "https://doc.rust\-lang.org/cargo/reference/config.html" "Cargo config files" "." |
| 55 | If not specified, the default registry is used, which is defined by the |
| 56 | \fBregistry.default\fP config key which defaults to \fBcrates\-io\fP. |
| 57 | .RE |
| 58 | .SS "Display Options" |
| 59 | .sp |
| 60 | \fB\-v\fP, \fB\-\-verbose\fP |
| 61 | .RS 4 |
| 62 | Use verbose output. May be specified twice for "very verbose" output which |
| 63 | includes extra output such as dependency warnings and build script output. |
| 64 | May also be specified with the \fBterm.verbose\fP |
| 65 | .URL "https://doc.rust\-lang.org/cargo/reference/config.html" "config value" "." |
| 66 | .RE |
| 67 | .sp |
| 68 | \fB\-q\fP, \fB\-\-quiet\fP |
| 69 | .RS 4 |
| 70 | No output printed to stdout. |
| 71 | .RE |
| 72 | .sp |
| 73 | \fB\-\-color\fP \fIWHEN\fP |
| 74 | .RS 4 |
| 75 | Control when colored output is used. Valid values: |
| 76 | .sp |
| 77 | .RS 4 |
| 78 | .ie n \{\ |
| 79 | \h'-04'\(bu\h'+03'\c |
| 80 | .\} |
| 81 | .el \{\ |
| 82 | . sp -1 |
| 83 | . IP \(bu 2.3 |
| 84 | .\} |
| 85 | \fBauto\fP (default): Automatically detect if color support is available on the |
| 86 | terminal. |
| 87 | .RE |
| 88 | .sp |
| 89 | .RS 4 |
| 90 | .ie n \{\ |
| 91 | \h'-04'\(bu\h'+03'\c |
| 92 | .\} |
| 93 | .el \{\ |
| 94 | . sp -1 |
| 95 | . IP \(bu 2.3 |
| 96 | .\} |
| 97 | \fBalways\fP: Always display colors. |
| 98 | .RE |
| 99 | .sp |
| 100 | .RS 4 |
| 101 | .ie n \{\ |
| 102 | \h'-04'\(bu\h'+03'\c |
| 103 | .\} |
| 104 | .el \{\ |
| 105 | . sp -1 |
| 106 | . IP \(bu 2.3 |
| 107 | .\} |
| 108 | \fBnever\fP: Never display colors. |
| 109 | .RE |
| 110 | .sp |
| 111 | May also be specified with the \fBterm.color\fP |
| 112 | .URL "https://doc.rust\-lang.org/cargo/reference/config.html" "config value" "." |
| 113 | .RE |
| 114 | .SS "Common Options" |
| 115 | .sp |
| 116 | \fB\-h\fP, \fB\-\-help\fP |
| 117 | .RS 4 |
| 118 | Prints help information. |
| 119 | .RE |
| 120 | .sp |
| 121 | \fB\-Z\fP \fIFLAG\fP... |
| 122 | .RS 4 |
| 123 | Unstable (nightly\-only) flags to Cargo. Run \fBcargo \-Z help\fP for |
| 124 | details. |
| 125 | .RE |
| 126 | .SH "ENVIRONMENT" |
| 127 | .sp |
| 128 | See \c |
| 129 | .URL "https://doc.rust\-lang.org/cargo/reference/environment\-variables.html" "the reference" " " |
| 130 | for |
| 131 | details on environment variables that Cargo reads. |
| 132 | .SH "EXIT STATUS" |
| 133 | .sp |
| 134 | 0 |
| 135 | .RS 4 |
| 136 | Cargo succeeded. |
| 137 | .RE |
| 138 | .sp |
| 139 | 101 |
| 140 | .RS 4 |
| 141 | Cargo failed to complete. |
| 142 | .RE |
| 143 | .SH "EXAMPLES" |
| 144 | .sp |
| 145 | .RS 4 |
| 146 | .ie n \{\ |
| 147 | \h'-04' 1.\h'+01'\c |
| 148 | .\} |
| 149 | .el \{\ |
| 150 | . sp -1 |
| 151 | . IP " 1." 4.2 |
| 152 | .\} |
| 153 | Save the API token to disk: |
| 154 | .sp |
| 155 | .if n .RS 4 |
| 156 | .nf |
| 157 | cargo login |
| 158 | .fi |
| 159 | .if n .RE |
| 160 | .RE |
| 161 | .SH "SEE ALSO" |
| 162 | .sp |
| 163 | \fBcargo\fP(1), \fBcargo\-publish\fP(1) |