LinuxCommandLibrary

cargo-owner

Manage crate ownership on crates.io

TLDR

Invite the given user or team as an owner

$ cargo owner [[-a|--add]] [username|github:org_name:team_name] [crate]
copy

Remove the given user or team as an owner
$ cargo owner [[-r|--remove]] [username|github:org_name:team_name] [crate]
copy

List owners of a crate
$ cargo owner [[-l|--list]] [crate]
copy

Use the specified registry (registry names can be defined in the configuration - the default is )
$ cargo owner --registry [name]
copy

SYNOPSIS

cargo owner [OPTIONS] <SUBCOMMAND> [<args>]

SUBCOMMANDS:
  add
  list
  remove

PARAMETERS

add <login>
    Add user as crate owner

list
    List all crate owners

remove <login>
    Remove user as crate owner

--registry <REGISTRY>
    Use specified registry (default: crates.io)

-h, --help
    Print help information

DESCRIPTION

The cargo owner command manages owners of Rust crates published to crates.io. Owners control publishing new versions, yanking releases, and owner management. Use it to add collaborators, list current owners, or remove access. Authentication requires cargo login or an API token in config. Specify a custom registry with --registry. Subcommands: add grants ownership to a user; list shows owners; remove revokes access. Only existing owners can run these. Ideal for team crate maintenance, ensuring secure permission delegation without sharing tokens.

CAVEATS

Requires prior cargo login as owner; cannot self-remove last owner; network-dependent on registry API.

EXAMPLES

cargo owner add username – add owner
cargo owner list – view owners
cargo owner remove username – remove owner

REQUIREMENTS

Rust/Cargo installed; API token via cargo login; crates.io account.

HISTORY

Added in Cargo 0.21.0 (May 2018) to simplify crates.io owner management, replacing manual registry interactions.

SEE ALSO

Copied to clipboard