Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could you not check for credHelpers on init? #3070

Closed
nomagick opened this issue Nov 22, 2022 · 1 comment · Fixed by #3080
Closed

Could you not check for credHelpers on init? #3070

nomagick opened this issue Nov 22, 2022 · 1 comment · Fixed by #3080

Comments

@nomagick
Copy link
Contributor

Request

Could you change the implementation a bit to not check for credHelpers binaries on init?

Context

We are kind of a PaaS/SaaS provider, and we are providing a credHelper for a particular registry.

However, the helper script, namely docker-credential-[the-thing], is part of a Python package.

Motivation

Contrary to the system credStore plugins, which are typically binary and installed to system PATH statically,
executables from Python packages tend to have some "Dynamicity", for example, managed by tools like pyenv or conda and have something to do with "active profile" configuration.

Now that the credHelper plugin is somewhat dynamic, the Docker configuration file, namely DOCKER_CONFIG/config.json is not expected to really change with the "active python environment" settings.

So it comes to a situation where people install our credHelper in a particular python environment and modifies the Docker configuration file to use the helper plugin. Then they move to some other python environment which does not have the helper plugin installed.

When people try to load docker-py from the environment without the plugin, it fails with docker.credentials.errors.InitializationError: docker-credential-[name-of-plugin] not installed or not available in PATH.

This kind of error does not trigger when people use the command-line docker client.

@milas
Copy link
Contributor

milas commented Nov 28, 2022

It seems reasonable to emit a warning here instead. Any operations that require authentication will end up failing regardless.

Happy to review a PR for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants