"Error from list function in secretservice_linux.c likely due to error in secretservice library"
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
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.
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.
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:
- Create two config jsons in your
~/.dockerdir. (config.jsonandconfigX.json, in my case) configX.jsonshould havesecretservicein it,config.jsonshould not- In your
~/.bashrcadd 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, orep(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
dockerfunction in your bash rc that checks every time the docker command is run, but this won't help in scripts ordocker-composeor 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.