how to add username and password info in url to avoid base authentication?
I use ui-as-standalone for this example, and the configuration file is as follows, I can enter my user(registry) password(ui) to complete basic authentication on my browser. But when I try to write the user password information in the url to access it directly, like this:http://registry:[email protected]:80 I can't skip the basic authentication. #####credentials.yml############ version: '2.0' services: registry: image: registry:2.7 ports: - 5000:5000 volumes: - /NLPDATA:/var/lib/registry - ./registry-config/credentials.yml:/etc/docker/registry/config.yml - ./registry-config/htpasswd:/etc/docker/registry/htpasswd
ui: image: joxit/docker-registry-ui:main ports: - 80:80 environment: - NGINX_PROXY_PASS_URL=http://registry:5000 - PULL_URL=http://myshare.io:5000 - SHOW_CONTENT_DIGEST=true - SHOW_CATALOG_NB_TAGS=true - CATALOG_MIN_BRANCHES=1 - CATALOG_MAX_BRANCHES=10 - TAGLIST_PAGE_SIZE=100 - REGISTRY_SECURED=false - CATALOG_ELEMENTS_LIMIT=1000 - REGISTRY_TITLE=myshare.io:5000 - SINGLE_REGISTRY=true depends_on: - registry #########registry-config/credentials.yml######## version: 0.1 log: fields: service: registry storage: delete: enabled: true cache: blobdescriptor: inmemory filesystem: rootdirectory: /var/lib/registry http: addr: :5000 headers: X-Content-Type-Options: [nosniff] Access-Control-Allow-Origin: ['*'] Access-Control-Allow-Methods: ['HEAD', 'GET', 'OPTIONS', 'DELETE'] Access-Control-Allow-Headers: ['Authorization', 'Accept'] Access-Control-Max-Age: [1728000] Access-Control-Allow-Credentials: [true] Access-Control-Expose-Headers: ['Docker-Content-Digest'] auth: htpasswd: realm: basic-realm path: /etc/docker/registry/htpasswd
Please read my other comment https://github.com/Joxit/docker-registry-ui/issues/348#issuecomment-1875923487
The basic auth via URL is giving the information to the user interface. The secured part is your registry server and not the user interface.
If using a password bothers you, you can add update your configuration (see https://github.com/Joxit/docker-registry-ui#available-options) set the basic auth url here
REGISTRY_URLor useNGINX_PROXY_PASS_URLwithNGINX_PROXY_HEADER_*The last option is deploy with SINGLE_REGISTRY=false and use the url query parameter with your password or use the demo
https://joxit.dev/docker-registry-ui/demo/?url=https://registry:ui@ip/for both solutions, you just need to bookmark the url and voilà.