Private Registry + Authentication - Push/Pull works, browse results in 401 #12219
Unanswered
Imagine-Programming
asked this question in
Help
Replies: 1 comment 1 reply
-
Sorry @Imagine-Programming I'm still new to Portainer. I'd like to help but all I see is portainer registry documentation on Registry browsing on the official documentation website. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Ask a Question!
In Portainer Business Edition 2.21.1 I have added a private registry with basic HTTP authentication. This works fine when pulling/retagging/pushing images and I can see that the auth is set in the
.docker/config.json
. The registry is also reachable from remote, so docker login works on remote system and on the host system. The registry is also reachable from other containers on the same network as portainer.The htpasswd used in the
registry:2
container is generated using the bcrypt-B
flag, everything is operational except for one feature that I'm breaking my brain on; I cannot browse the registry from Portainer.In the network tab of the development console I can see that the portainer front-end is trying to load
https://<portainer_domain.maindomain.com>/api/registries/14/v2/
but it responds with a 301 tohttps://<registry_domain.maindomain.com>/v2/
. This redirect does not include any authentication data. I also don't understand why Portainer would redirect to the registry directly, rather than serving as a proxy like the situation I describe below.The registry is behind a reverse proxy using nginx configured with SSL. In a similar configuration on another machine this entire configuration works, however in that configuration there is no authentication configured for the registry. In that machine, the redirect also does not occur.
I'm a bit confused and at a loss for where to look. Are there certain configurations required in the reverse proxy for this to succeed?
Beta Was this translation helpful? Give feedback.
All reactions