Skip to content

docs: notation login error message improvement #681

@Wwwsylvia

Description

@Wwwsylvia

What is the areas you would like to add the new feature to?

Notation CLI

Is your feature request related to a problem?

When we run notation login with a valid username and password, and there is no credentials store configured, we get the below error message:

image

failed to log in to {registryName}, the credential could not be saved because a credentials store is required to securely store the password. See https://notaryproject.dev/docs/how-to/registry-authentication/

The error message is thrown from here.

There is a chance that we have another valid credential stored in docker config file, and we can do notation sign successfully, although the login command failed.
Is there any way to improve the error message to convey this information to users and avoid confusions?

What solution do you propose?

For the case where there is an existing credential that does not match the provided valid credential, @Two-Hearts proposed the below error message in the PR comment:

failed to log in to {registryName}: user provided credential does not match the existing one. To log in, a credentials store is required to securely store the new password. See https://notaryproject.dev/docs/how-to/registry-authentication/.

What alternatives have you considered?

Still thinking

Any additional context?

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesterror messageIssues related to error message improvement

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions