Invalid Auth config file when using credsStore
See original GitHub issueUsing a “credsStore” configuration for auth in ~/.docker/config.json causes AuthConfigFile to fail with an IOException.
com.github.dockerjava.api.exception.DockerClientException: Failed to parse dockerCfgFile
at com.github.dockerjava.core.DefaultDockerClientConfig.effectiveAuthConfig(DefaultDockerClientConfig.java:268)
at com.github.dockerjava.core.DockerClientImpl.pullImageCmd(DockerClientImpl.java:215)
Caused by: java.io.IOException: Invalid Auth config file
at com.github.dockerjava.core.AuthConfigFile.loadConfig(AuthConfigFile.java:146)
at com.github.dockerjava.core.DefaultDockerClientConfig.effectiveAuthConfig(DefaultDockerClientConfig.java:266)
... 16 more
After a little debugging it looks like the json parsing fails silently a little earlier in AuthConfigFile.java:
com.fasterxml.jackson.databind.JsonMappingException: Can not instantiate value of type [map type; class java.util.LinkedHashMap, [simple type, class java.lang.String] -> [simple type, class com.github.dockerjava.api.model.AuthConfig]] from String value ('osxkeychain'); no single-String constructor/factory method
at [Source: config.json; line: 4, column: 3] (through reference chain: java.util.LinkedHashMap["credsStore"])
at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:148)
at com.fasterxml.jackson.databind.DeserializationContext.mappingException(DeserializationContext.java:878)
at com.fasterxml.jackson.databind.deser.ValueInstantiator._createFromStringFallbacks(ValueInstantiator.java:281)
at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromString(StdValueInstantiator.java:284)
at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:334)
at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:26)
at com.fasterxml.jackson.databind.deser.std.MapDeserializer._readAndBindStringMap(MapDeserializer.java:495)
at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:341)
at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:26)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3736)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2639)
at com.github.dockerjava.core.AuthConfigFile.loadConfig(AuthConfigFile.java:117)
at com.github.dockerjava.core.DefaultDockerClientConfig.effectiveAuthConfig(DefaultDockerClientConfig.java:266)
at com.github.dockerjava.core.DockerClientImpl.pullImageCmd(DockerClientImpl.java:215)
Issue Analytics
- State:
- Created 7 years ago
- Reactions:6
- Comments:16 (6 by maintainers)
Top Results From Across the Web
invalid auth configuration file | The Search Engine You Control
Using a "credsStore" configuration for auth in ~/.docker/config.json causes AuthConfigFile to fail with an IOException. com.github.dockerjava.api.exception.
Read more >Pull an Image from a Private Registry - Kubernetes
This page shows how to create a Pod that uses a Secret to pull an image from a private container image registry or...
Read more >"docker-credential-desktop.exe": executable file not found in ...
I just renamed credsStore to credStore in ~/.docker/config.json. ... No clear answer on why does this work and what could be a better...
Read more >Docker-credential-desktop.exe executable file not found in ...
Using the latest build of Windows 10 and Docker for Windows ... pages also suggested deleting the config.json file or renaming the credStore ......
Read more >Docker: DockerClientException `Failed to parse dockerCfgFile ...
Result: run fails with the error: ... IOException: The Auth Config file is empty ... Note: all is ok with running a container...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same issue. Gradle build always fails on macOS with latest version of https://github.com/bmuschko/gradle-docker-plugin and
docker-java
version3.0.6
.config.json:
The error still happens with version 3.0.14 when using
com.bmuschko.docker-remote-api
gradle plugin.~/.docker/config
content isDocker version is
Version 2.0.0.0-mac81 (29211)
, Engine Version: 18.09.0Securely store Docker logins in macOS keychain
is unchecked in Preference.Please advise…