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

More specific error message for nonexistent or invalid repository #1743

Open
veeara282 opened this issue Mar 18, 2019 · 0 comments
Open

More specific error message for nonexistent or invalid repository #1743

veeara282 opened this issue Mar 18, 2019 · 0 comments

Comments

@veeara282
Copy link

Docker should give a more specific error message than "access denied" when the user tries to push to a nonexistent repository (or an illegally named repository). It should only issue an "access denied" error when the repository does exist but the user does not have permission to push to it.

Alternatively, issue an error message when the user tries to create an image with an invalid name. For example, aidan-fitz/benji-soda cannot exist because usernames cannot contain hyphens.

My situation:

When I try to push to the nonexistent repository aidan-fitz/benji-soda, Docker tries to proceed as if the repository exists, and then reports "access denied" when it fails. The correct repository location is aidanfitz/benji-soda.

$ docker push aidan-fitz/benji-soda:alpine
The push refers to a repository [docker.io/aidan-fitz/benji-soda]
91c1386ce230: Preparing 
d092dff2846f: Preparing 
12f8ec9c52aa: Preparing 
c244ccf1eeca: Preparing 
9aed9ade65c4: Preparing 
89c236973485: Waiting 
d9ff549177a9: Waiting 
denied: requested access to the resource is denied

The informational message The push refers to a repository [docker.io/aidan-fitz/benji-soda] is misleading because it does not refer to a valid repository. This would be a good place to catch the user's mistake.

A better error message might look like this:

$ docker push aidan-fitz/benji-soda:alpine
aidan-fitz/benji-soda: not a valid repository name

I copied this issue from docker/for-linux#626.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants