config/credentials: don't run 'pass' to detect it#1160
Merged
vdemeester merged 1 commit intodocker:masterfrom Jul 2, 2018
Merged
config/credentials: don't run 'pass' to detect it#1160vdemeester merged 1 commit intodocker:masterfrom
vdemeester merged 1 commit intodocker:masterfrom
Conversation
vdemeester
approved these changes
Jun 29, 2018
Collaborator
vdemeester
left a comment
There was a problem hiding this comment.
LGTM 🐯
@euank you're gonna need to update the vendoring as I think we may not depend on github.com/docker/docker-credential-helpers/pass package anymore 😝
silvin-lubecki
approved these changes
Jun 29, 2018
Contributor
silvin-lubecki
left a comment
There was a problem hiding this comment.
LGTM (but need to update the vendoring)
8f179b6 to
fb1150d
Compare
'CheckInitialized' in the credential-helper library actually invokes `pass`, which isn't desirable (see docker#699). This moves the check to be simpler, and then pass will only be invoked when it's needed (such as for `docker login` or when pulling from a private registry). This logic could also reasonably live in the credential-helper library, but it's simple enough it seems fine in either location. Signed-off-by: Euan Kemp <euank@euank.com>
Contributor
Author
|
Updated, CI is happy now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
'CheckInitialized' in the credential-helper library actually invokes
pass, which isn't desirable (see #699).This moves the check to be simpler, and then pass will only be invoked
when it's needed (such as for
docker loginor when pulling from aprivate registry).
This logic could also reasonably live in the credential-helper library,
but it's simple enough it seems fine in either location.
Fixes #699.
- How to verify it
Before this change, running
docker helpor any such command with an empty config would callpass.After this change,
passis not executed unless the following are all true:passis in the PATHdocker-credential-passis in the PATHdocker loginor a similar command which needs credentials was invoked.- Description for the changelog
passis only invoked if the associated credential helper is installed, no other helper is configured, and credentials are needed.- A picture of a cute animal (not mandatory but encouraged)

Credit: Robert Irwin