You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am having an issue with my private docker registry, which is using a token auth server I have written.
The registry is set to use https://mydomain.io/imagetoken for REGISTRY_AUTH_TOKEN_REALM. This endpoint responds to basic auth with a JWT token.
I am able to manually retrieve a token by making a request against my endpoint: curl -v -d -X POST -u "username:password" "https://authserver.io/v1/imagetoken"
Response:
{"token":"token","access_token":"token"}
I am able to use that token to hit the registry successfully: curl -H "Authorization: Bearer TOKEN" https://private-registry.io/v2/
Response: {}
However, when I attempt to use docker login to authenticate with my private registry I run into issues.
docker login -u foo -p bar private-registry.io
Response: Error response from daemon: Get "https://private-registry.io/v2/": received unexpected HTTP status: 501 Not Implemented
And I see this in the logs of the private registry:
My general suspicion is: docker daemon does not seem to be able to handle calls to private registry. I am going to assume that your private registry is served over trusted TLS cert otherwise you'd need to explicitly tell docker daemon it is untrusted i.e. insecure in docker daemon.json settings. If you dont, the daemon will barf. The config goes something like this IIRC -- please check the official docs.
Description
I am having an issue with my private docker registry, which is using a token auth server I have written.
The registry is set to use
https://mydomain.io/imagetoken
forREGISTRY_AUTH_TOKEN_REALM
. This endpoint responds to basic auth with a JWT token.I am able to manually retrieve a token by making a request against my endpoint:
curl -v -d -X POST -u "username:password" "https://authserver.io/v1/imagetoken"
Response:
I am able to use that token to hit the registry successfully:
curl -H "Authorization: Bearer TOKEN" https://private-registry.io/v2/
Response:
{}
However, when I attempt to use docker login to authenticate with my private registry I run into issues.
docker login -u foo -p bar private-registry.io
Response:
Error response from daemon: Get "https://private-registry.io/v2/": received unexpected HTTP status: 501 Not Implemented
And I see this in the logs of the private registry:
Reproduce
registry:2.8.3
Expected behavior
The registry should log in successfully if it is just passing the basic auth credentials to the token server
registry version
registry:2.8.3
Additional Info
No response
The text was updated successfully, but these errors were encountered: