question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Invalid Auth config file when using credsStore

See original GitHub issue

Using 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:closed
  • Created 7 years ago
  • Reactions:6
  • Comments:16 (6 by maintainers)

github_iconTop GitHub Comments

20reactions
kshchepanovskyicommented, Mar 19, 2017

Same issue. Gradle build always fails on macOS with latest version of https://github.com/bmuschko/gradle-docker-plugin and docker-java version 3.0.6.

config.json:

{
  "auths": {
    "https://index.docker.io/v1/": {}
  },
  "credsStore": "osxkeychain"
}
4reactions
cooniurcommented, Jan 11, 2019

The error still happens with version 3.0.14 when using com.bmuschko.docker-remote-api gradle plugin.

~/.docker/config content is

{
  "stackOrchestrator" : "swarm"
}

Docker version is Version 2.0.0.0-mac81 (29211), Engine Version: 18.09.0 Securely store Docker logins in macOS keychain is unchecked in Preference.

Please advise…

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found