google / containerregistry

A set of Python libraries and tools for interacting with a Docker Registry.
https://gcr.io
Apache License 2.0
206 stars 115 forks source link

forced url server specification fails to match for docker-credentials-secretservice #147

Open werkt opened 5 years ago

werkt commented 5 years ago

a49af3639b3e055bea61a6f5ddd0fe631d559489 introduced a compulsory url prefix, without any checking, into the credentials helper for referencing server entries.

On systems with docker-credentials-secretservice, required on ubuntu 18.04 through docker-compose and provided by golang-docker-credential-helpers, docker login <registry> strips any registry url down to store credentials with only the hostname as a key.

This means that with the compulsory https:// prefix, values cannot be retrieved through containerregistry for any system where the credsStore is secretservice, and through its own mechanism of searching out credential stores, this adoption of secretstore as a container cannot be avoided if it is on the $PATH when docker login is invoked (or even if the secretstore credsStore were to be preferred). rules_docker is obviously afflicted through both its direct dependency on containerregistry, and the puller par binary.

Can the compulsory url prefix be dropped and pathways to stores that require the url (gcr as observed) be required to provide the format needed by the selected credsStore, making this an implementation detail?