Poetry has a very annoying bug that prevents people from using it, unless they use Gnome (most don’t, surprise!).

The background is that Gnome sets up its keyring and you unlock it by logging in. Now, if you use a different desktop environment, it might or might not have keyring functionality. I use the (quite popular for its kind) i3 window manager, and i3 doesn’t have a keyring builtin. I’ll look for a standalone solution to integrate into my i3 setup, but meanwhile…

There is a simple solution: just set the keyring Python expects to the “null” keyring by adding this line to your .bashrc, or as in my case, .zshrc:

export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring

Problem (for now) solved.

References:

bug #1917, poetry on github - this is where I found the fix.

bug #6494, poetry on github - this is a duplicate of #1917, but gives a solution how this could be fixed in poetry itself.