5

I am getting these two messages when running a command line utility (in the case pgcli) in an headless Linux running in Docker:

No handlers could be found for logger "keyring.backend"
Please enter password for encrypted keyring:

How can I configure the logger and the password for keyring, so that I am no longer bothered when running any utility dependent on keyring?

Note that I am on an headless Ubuntu, so I need to know how to do this from the command line.

Thanks

2 Answers 2

5

We fixed the problem in v1.10.1, but right now you still need to pip install keyrings.alt package for things to work. There's an open PR to handle things better and make keyring package optional. As soon as that's merged, we'll do another bugfix release. Stay with us - and thank you for using pgcli!

Sign up to request clarification or add additional context in comments.

5 Comments

How do I install such package? Run pip install keyring.alt? I like pgcli very much !
Yes, exactly. But v1.10.2 is now out as well. You should not need keyring at all once you install that.
pip2 install keyring.alt and pip3 install keyring.alt result in error like Collecting keyring.alt Could not find a version that satisfies the requirement keyring.alt (from versions: ) No matching distribution found for keyring.alt
There was a spelling mistake above, it's pip install keyrings.alt with the extra s
This worked for me on ubuntu, but the password is not encrypted I guess, but I can lice with that
0

v1.10.2 is now out, with keyring optional. Using pgcli on a headless system should not be a problem anymore.

8 Comments

I have upgraded to v1.10.2. The "No handlers ..." message is gone, but everytime I run pgcli it keeps asking me "Please enter password for encrypted keyring:". I do not see there any option to disable the use of keyring in the updated pgcli. Please, clarify how can I avoid using keyring. Thanks
I have configured the keyring = False under [main] in ~/.config/pgcli/config but still asks me for the encrypted keyring password. I even deleted ~/.local/share/python_keyring/crypted_pass.cfg and then when running pgcli I get the prompt "Please set a password for you new keyring:".
Only if I create/edit the file ~/.local/share/python_keyring/keyringrc.cfg with the entry [backend] \n default-keyring=keyrings.alt.file.PlaintextKeyring, then it still uses keyring (and keyring.alt) but the backend does not require a password, so the previous prompt does not appear. HOWEVER, pgcli is still using keyring. Please, check again this situation in pgcli, so that the keyring = False is really working.
I'll take a look. Quick question - do you still have keyring package installed? You need to uninstall it (pip uninstall keyring) so that pgcli won't try to use it.
Yes, I have installed keyring (10.1) and keyrings.alt (1.3).
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.