Docker client does not handle HTTP 401 responses properly #11016
Labels
exp/beginner
kind/enhancement
Enhancements are not bugs or new features but can improve usability or performance.
Context
I am running a private Docker registry (h3nrik/simple-registry). On top an nginx authentication proxy is running (h3nrik/registry-ldap-auth). That proxy enforces the username to match the image namespace when creating or deleting tags. That works so far without any problems.
Problem description
When I now use the Docker client to push an image with a namespace that does not match the username the proxy returns an HTTP 401 response. But the client does not show any error message it just ends unexpectedly with a return code 1:
Expectation
I would expect the client to display a proper error message because the Docker Registry API specification explicitly lists a possible HTTP 401 error for those two requests (and also for others but these are the only ones that I have tested so far):
Environment
The text was updated successfully, but these errors were encountered: