-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
config/credentials: don't run 'pass' to detect it #1160
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 😝
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (but need to update the vendoring)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM
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>
Updated, CI is happy now. |
'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 login
or 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 help
or any such command with an empty config would callpass
.After this change,
pass
is not executed unless the following are all true:pass
is in the PATHdocker-credential-pass
is in the PATHdocker login
or a similar command which needs credentials was invoked.- Description for the changelog
pass
is 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