-
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
Allow username/password in config file #2122
Conversation
Signed-off-by: Jon Johnson <jonjohnson@google.com>
ping @tiborvass Came across this when I switched over to using docker/cli for config file parsing. Docker seems to ignore the username/password fields from a config file if they're set directly instead of the "auth" field. |
@silvin-lubecki @chris-crone @vdemeester Could you please take a look at this small fix. It would really help. Thanks! |
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 🐯
Signed-off-by: Jon Johnson <jonjohnson@google.com>
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
@jonjohnsonjr linter is complaining
|
Signed-off-by: Jon Johnson <jonjohnson@google.com>
- What I did
Only decode
auth
if it is present. Currently, this overwritesusername
andpassword
fields, even ifauth
is empty.Fixes google/go-containerregistry#555
- How I did it
Guard
decodeAuth
with an empty string check.- How to verify it
Run the unit test :)
Alternatively, modify your config file to use username/password instead of auth and try it. I have a branch here which seems to work when I try it 👍
- Description for the changelog
Fix reading config files containing "username" and "password" auth.