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 ran:
docker run --rm --entrypoint htpasswd registry:2.6 -Bbn username pass$word > /var/lib/registry/auth/htpasswd-file
Then started registry like this:
registry:
restart: always
image: registry:2.6
ports:
- 443:443
volumes:
- /var/lib/registry/conf/config.yml:/etc/docker/registry/config.yml
- /var/lib/registry/certs:/certs
- /var/lib/registry/auth:/auth
And when I do:
docker login https://localhost
Username: username
Password:
Error response from daemon: login attempt to https://localhost/v2/ failed with status: 401 Unauthorized
Recreate the htpasswd file with 'username' 'password'
and it works. Tried with 2.7 as well, same behavior
The text was updated successfully, but these errors were encountered:
Docker Info
Containers: 4
Running: 4
Paused: 0
Stopped: 0
Images: 148
Server Version: 18.03.0-ce
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: cfd04396dc68220d1cecbe686a6cc3aa5ce3667c
runc version: 4fc53a81fb7c994640722ac585fa9ca548971871
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 4.16.0-1.el7.elrepo.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 7.789GiB
Name: ip-10-227-81-147
ID: SHVB:UU7A:23FQ:KZ7N:2XFH:NW22:OQIR:OP7A:GYTI:HCBP:6BVY:SNOV
Docker Root Dir: /docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
dsg.infra
127.0.0.0/8
Live Restore Enabled: false
Registry config.yml
version: 0.1
storage:
filesystem:
rootdirectory: /registry
delete:
enabled: true
http:
addr: 0.0.0.0:443
tls:
certificate: /certs/my-registry.crt
key: /certs/my-registry.key
auth:
htpasswd:
realm: Registry Realm
path: /auth/htpasswd-file
log:
level: debug
I ran:
docker run --rm --entrypoint htpasswd registry:2.6 -Bbn username pass$word > /var/lib/registry/auth/htpasswd-file
Then started registry like this:
registry:
restart: always
image: registry:2.6
ports:
- 443:443
volumes:
- /var/lib/registry/conf/config.yml:/etc/docker/registry/config.yml
- /var/lib/registry/certs:/certs
- /var/lib/registry/auth:/auth
And when I do:
docker login https://localhost
Username: username
Password:
Error response from daemon: login attempt to https://localhost/v2/ failed with status: 401 Unauthorized
Recreate the htpasswd file with 'username' 'password'
and it works. Tried with 2.7 as well, same behavior
The text was updated successfully, but these errors were encountered: