Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve error message when registry credential config is not valid #1236

Closed
Tracked by #1218
qweeah opened this issue Jan 9, 2024 · 0 comments · Fixed by #1235
Closed
Tracked by #1218

improve error message when registry credential config is not valid #1236

qweeah opened this issue Jan 9, 2024 · 0 comments · Fixed by #1235
Assignees
Labels
ux User experience related
Milestone

Comments

@qweeah
Copy link
Contributor

qweeah commented Jan 9, 2024

E.g. pulling an artifact and the target credential cannot be found in the config, current output will be like:

$ oras pull localhost:7000/repo:tag --registry-config auth.config
Error: failed to resolve tag: GET "http://localhost:7000/v2/repo/manifests/tag": credential required for basic auth

The error message is not helpful since

  1. It's purely a local error but contains details like HTTP method and URI
  2. Doesn't mention how to fix the issue

Suggest to change the error to sth like:

$ oras pull localhost:7000/repo:tag --registry-config auth.config
Error: failed to authenticate when attempting to pull: no valid credential found in auth.config
Please check whether the registry credential stored in the authentication file is correct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ux User experience related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant