I have confirmed that the registry is both aware of and definitely accessing my htpasswd file, as an invalid entry or filepath produces a different error log. Also of note is that the registry is running on a remote server with a valid hostname.
I have generated my htpasswd file using the command provided in the documentation:
docker run --entrypoint htpasswd registry:2 -Bbn user password > htpasswd
I'm using the following Dockerfile to build the image, and the following docker-compose to run it:
# Pull the registry image.
FROM registry:2
# Add basic authentication.
RUN mkdir /auth
COPY ./htpasswd /auth/htpasswd
# Add TLS certs.
RUN mkdir /tls
COPY ./.crt /tls/.crt
COPY ./.key /tls/.key
# Expose 443.
EXPOSE 443
The TLS pair in use is a child certificate of a private CA - but this CA is trusted by the machine running the docker client attempting to login. I don't think it is a TLS-related issue as we seem to complete TLS handshake fine to receive a HTTP 401 error.
I am definitely using the correct password to login. What could be the problem here?
I'm receiving the following error message when attempting to login to a private registry from my local device:
The logs from the registry server provide the following information:
I have confirmed that the registry is both aware of and definitely accessing my
htpasswd
file, as an invalid entry or filepath produces a different error log. Also of note is that the registry is running on a remote server with a valid hostname.I have generated my
htpasswd
file using the command provided in the documentation:docker run --entrypoint htpasswd registry:2 -Bbn user password > htpasswd
I'm using the following Dockerfile to build the image, and the following docker-compose to run it:
The TLS pair in use is a child certificate of a private CA - but this CA is trusted by the machine running the docker client attempting to login. I don't think it is a TLS-related issue as we seem to complete TLS handshake fine to receive a HTTP 401 error.
I am definitely using the correct password to login. What could be the problem here?