docker-registry-web
docker-registry-web copied to clipboard
curl UNAUTHORIZED
curl UNAUTHORIZED
I run docker-compose.yml in docker-registry-web/examples/auth-enabled, and everything work fine. Now I have thoudsands of images to prune, and I choose not to delete them one by one using Web UI. I want to try a script contains curl command, but when runing
curl ipaddress:5000/v2/_catalog
I got
{"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":[{"Type":"registry","Name":"catalog","Action":"*"}]}]}
How to get auth and run curl ?
My configuration
cat conf/registry/config.yml
version: 0.1
storage:
filesystem:
rootdirectory: /registry
delete:
enabled: true
http:
addr: 0.0.0.0:5000
auth:
token:
#realm: http://localhost:8080/api/auth
#service: localhost:5000
realm: http://ipaddress:8080/api/auth
service: ipaddress:5000
issuer: test
rootcertbundle: /etc/docker/registry/auth.cert
log:
level: info
notifications:
endpoints:
- name: listener
url: http://registry-web:8080/api/notification
timeout: 500ms
threshold: 5
backoff: 1s
ipaddress is a lan ip address.
I see now how to get token (GET http://ipaddress:8080/api/auth), but still confuse how to use token in curl.
I am facing the same issue. how can I do it?
I am facing the same issue. how can I do it?
https://www.arthurkoziel.com/dockerhub-registry-api/ ?
I am facing the same issue. how can I do it?
https://www.arthurkoziel.com/dockerhub-registry-api/ ?
thank you so much for your reply.
but the link is not working with the docker-registry-web auth. I mean even if you will send like that
curl -s -H "Content-Type: application/json" -X POST -d '{"j_username": "exiting_username", "j_password": "real_password"}' https:///api/auth](http://ipaddress:8080/api/auth
OR
curl -s -H "Content-Type: application/json" -X POST -d '{"username": "exiting_username", "password": "real_password"}' https:///api/auth](http://ipaddress:8080/api/auth
the answer is
No auth
So I am still looking for a solution to obtain a TOKEN from docker-regitry-web via wget or curl.