Skip to content
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

Could not read docker config json #27

Open
ch4174nya opened this issue Jan 20, 2017 · 3 comments
Open

Could not read docker config json #27

ch4174nya opened this issue Jan 20, 2017 · 3 comments

Comments

@ch4174nya
Copy link

ch4174nya commented Jan 20, 2017

Hi,
I've been trying to run collector in the standalone mode, for a local image, that I had pulled from dockerhub previously. However, I'm getting the following errors, about it being unable to read the docker config file. I get the same error if I try with the example given in collector --help.

[DEBG] (main.doFlags:63) Creating directory: /home/chaitanya/.banyan [DEBG] (main.doFlags:63) Creating directory: /home/chaitanya/.banyan/hostcollector [DEBG] (main.doFlags:63) Creating directory: /home/chaitanya/.banyan/hostcollector [DEBG] (main.doFlags:63) Creating directory: /home/chaitanya/.banyan/hostcollector/banyanout [DEBG] (main.doFlags:63) Creating directory: /home/chaitanya/.banyan/hosttarget/defaultscripts [DEBG] (main.doFlags:63) Creating directory: /home/chaitanya/.banyan/hosttarget/userscripts [DEBG] (main.doFlags:63) Creating directory: /home/chaitanya/.banyan/hosttarget/bin [INFO] (main.checkRepoList:357) Repolist: /home/chaitanya/.banyan/hostcollector/repolist not specified [INFO] (main.checkRepoList:387) Limiting collection to the following repos: [INFO] (main.checkRepoList:389) sassmann/debian-firefox [INFO] (collector.DockerAPI:185) DockerAPI http://example.com/version [EROR] (except.Error:23) Could not read /home/chaitanya/.docker/config.json, trying $HOME/.dockercfg [EROR] (except.Fail:22) Could not read%!(EXTRA string=/home/chaitanya/.dockercfg)
Any ideas as to what am I missing? Also let me know, if there exists a mailing-list or something where asking this would be more appropriate.
Thanks!

@ch4174nya
Copy link
Author

Worked after docker login.

@yoshiotu
Copy link
Contributor

Thanks for reporting this. Ideally, collector's code should be modified a little so that it will no longer look for a docker config file if it's started in local.host mode.

@yoshiotu yoshiotu reopened this Jan 24, 2017
@apexcz
Copy link

apexcz commented Jul 31, 2018

Probably your .docker/config.json file is empty or stored in a keychain (in the case of mac) with the "credsStore": "osxkeychain". If the later is the case.

docker logout
Go to Docker -> Preferences -> General :: uncheck the checkbox "Securely store credentials.."
docker login

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants