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

"Error from list function in secretservice_linux.c likely due to error in secretservice library" #173

Open
freeone3000 opened this issue Jan 24, 2020 · 3 comments

Comments

@freeone3000
Copy link

freeone3000 commented Jan 24, 2020

I'm using the release of docker-credential-secretservice v0.6.3. I get the following error when running docker-credential-secretservice list:
Error from list function in secretservice_linux.c likely due to error in secretservice library

This error is the same whether I build v0.6.3 from source, master from source, or use the .tar.gz provided on the Releases section.

This error appears to be session-dependant - opening a new terminal window no longer causes the error. Some basic shell information (given randomly): https://gist.github.com/freeone3000/655e1e33c863a7a3f7a09fc4f9eda1dd

@freeone3000
Copy link
Author

freeone3000 commented Jan 27, 2020

Issue appears to go away if X forwarding is removed, so the easiest way to reproduce is to start a session without starting X, and attempt to run docker-compose where docker-credential-secretservice is required.

@andyneff
Copy link

I just ran into this. It was trying to pop up a GUI to unlock the keyring, but since I was ssh'ed in and didn't have graphics forwarding, it gave this unclear error.

This should reproduce the error easily by "disabling" X temporarily:

DISPLAY= docker-credential-secretservice list

and in my case, making X forwarding work made the error message go away.

@andyneff
Copy link

Since it appears no progress is being made on this, and many people working remotely now over ssh, I will at least offer a hacky work around:

  1. Create two config jsons in your ~/.docker dir. (config.json and configX.json, in my case)
  2. configX.json should have secretservice in it, config.json should not
  3. In your ~/.bashrc add the following
if timeout 1 xset q &> /dev/null; then
  export DOCKER_CONFIG=~/.docker/configX.json
# else
#   export DOCKER_CONFIG=~/.docker/config.json
fi

This has MANY drawbacks, including but not limited to:

  • Not DRY, you have to remember to change two files, and keep them in sync. You could get clever and create an "config_autogenerated_x.json" files by either sed, cating pieces together, or ep (envplate), but for my purposes, my config is simple enough I don't care about this
  • If you X status changes while you are still running bash, this will obviously not update. Again, you could work around this by writing a docker function in your bash rc that checks every time the docker command is run, but this won't help in scripts or docker-compose or other clients.
  • If bash is not your shell of choice, you'd have to figure out the same for your shell, etc...

But at least when you get back logging into a computer graphically, secretservice will be used again.

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

2 participants