-
Notifications
You must be signed in to change notification settings - Fork 565
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
Parsing config.json
for Auth on Mac OS with "credsStore": "osxkeychain" fails
#677
Comments
@michaeldye hey, thanks for reporting this. We can fix the parsing issue, but right now go-dockerclient isn't integrated with osxkeychain and wouldn't be able to retrieve your credentials there. I think that you could use docker's helpers to load the data from the keychain (https://github.com/docker/docker-credential-helpers/tree/master/osxkeychain), then construct AuthConfiguration from the data you get from the keychain. Doing that in go-dockerclient would make go-dockerclient require CGO, which isn't really worth it. There could be a package that given a |
@fsouza hey, the workaround by manual adding auth base64 encoded string to config.json could be easy: Do you consider returning error only if there are no one valid auth string in config file? |
Hey @coodix, thanks for the feedback. YEah, that makes sense. I'm gonna modify the code to behave as you suggested. Thank you very much! |
So I solved this on OSX by disabling the keychain password storage:
Or for glcoud and pushing to gcr: now your If someone gets the keychain storage to work that would be nice... |
I have a Docker config file in
~/.docker/config.json
with this content:{ "auths": { "mydomain.org": {} }, "credsStore": "osxkeychain" }
... I get an
ErrCannotParseDockercfg
returned from https://github.com/fsouza/go-dockerclient/blob/master/auth.go#L138 .The text was updated successfully, but these errors were encountered: