Skip to content

Add --token to cargo info #15273

@marcoieni

Description

@marcoieni

Problem

cargo publish allow to pass --token <TOKEN> to authenticate.
I was expecting cargo info to support the same, so that it can used with private registries as well.

Proposed Solution

Allow authenticating using --token in cargo info.

Notes

I'm interested in this because I want to use cargo info PACKAGE@VERSION in release-plz to programmatically detect if a package is published.
At the moment I use the crates-index crate for that but I would like to get rid of this dependency and simplify my code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-infoS-triageStatus: This issue is waiting on initial triage.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions