The Problem
When running DockerClient.images.build(...), if a StoreError is raised when running AuthConfig._resolve_authconfig_credstore (link) when trying to create auth headers for the build request, the whole command fails.
For my specific example, I have gcloud auth artifacts on my local machine that require login once per day - if I have not logged in and try to build a publicly accessible image, that build will still fail since docker-credentials-gcloud get exits non-zero by prompting me to log in again, even though that auth is not required.
Proposed Solution
Either:
- try/except each call to
_resolve_authconfig_credstore in get_all_credentials (link and link) and just don't add them to auth_data if the call errors
- do not raise a DockerExecption from the
StoreError in _resolve_authconfig_credstore and treat it the same as a CredentialsNotFound error (I could see this breaking other things)
The Problem
When running
DockerClient.images.build(...), if a StoreError is raised when runningAuthConfig._resolve_authconfig_credstore(link) when trying to create auth headers for the build request, the whole command fails.For my specific example, I have gcloud auth artifacts on my local machine that require login once per day - if I have not logged in and try to build a publicly accessible image, that build will still fail since
docker-credentials-gcloud getexits non-zero by prompting me to log in again, even though that auth is not required.Proposed Solution
Either:
_resolve_authconfig_credstoreinget_all_credentials(link and link) and just don't add them toauth_dataif the call errorsStoreErrorin _resolve_authconfig_credstore and treat it the same as aCredentialsNotFounderror (I could see this breaking other things)