Error message with credential-process
and a token
is confusing.
#12320
Labels
A-credential-provider
Area: credential provider for storing and retreiving credentials
A-diagnostics
Area: Error and warning messages generated by Cargo itself.
C-bug
Category: bug
S-needs-mentor
Status: Issue or feature is accepted, but needs a team member to commit to helping and reviewing.
Problem
If you are currently logged in to a registry using the typical
token
setting incredentials.toml
, and you add a configuration forregistry.credential-process
, the error message when runningcargo login
is a little confusing:If a user is not following the instructions to the letter, or is not intimately familiar with cargo's auth setup, this doesn't really tell you what to do to fix the error.
Steps
cargo login
config.toml
:cargo login -Zcredential-process
Possible Solution(s)
The error message could be a little clearer about what it means about a "
token
...in the config". A user may not know or equate that a legacycargo login
means that a "token is in the config". I would probably completely reword this error message to explain that they are logged in via the old mechanism, and that needs to be removed before usingcredential-process
(though I'm not sure how to phrase "old mechanism").I think the message could also include some instructions on how to fix it (such as running
cargo logout
).Notes
No response
Version
The text was updated successfully, but these errors were encountered: