cargo 0.45.1

Cargo, a package manager for Rust.
Documentation
= cargo-login(1)
:idprefix: cargo_login_
:doctype: manpage

== NAME

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

== SYNOPSIS

`cargo login [_OPTIONS_] [_TOKEN_]`

== DESCRIPTION

This command will save the API token to disk so that commands that require
authentication, such as man:cargo-publish[1], will be automatically
authenticated. The token is saved in `$CARGO_HOME/credentials`. `CARGO_HOME`
defaults to `.cargo` in your home directory.

If the _TOKEN_ argument is not specified, it will be read from stdin.

The API token for crates.io may be retrieved from https://crates.io/me.

Take care to keep the token secret, it should not be shared with anyone else.

== OPTIONS

=== Login Options

include::options-registry.adoc[]

=== Display Options

include::options-display.adoc[]

=== Common Options

include::options-common.adoc[]

include::section-environment.adoc[]

include::section-exit-status.adoc[]

== EXAMPLES

. Save the API token to disk:

    cargo login

== SEE ALSO
man:cargo[1], man:cargo-publish[1]