I've tried dozens of guides on installing mercurial and keyring extensions on Ubuntu and have never been able to get the keyring extension to work. It was a snap under Windows.
I've installed mercurial many different ways. I'm not sure if the install method has anything to do with the keyring, but here are a few of the things I've tried:
sudo apt-get install mercurial
sudo apt install mercurial
pip install mercurial
- ... and so on.
I even used this method where it compiles mercurial.
All of these methods work for mercurial. It runs. I can do commits, etc. It's keyring
and mercurial_keyring
installations that are giving me trouble. I installed both of those using pip install
. When I do a command like:
hg out http://somerepo
At the moment, I'm getting the following message:
No handlers could be found for logger "keyring.backend"
I feel like there is a concise set of steps to get keyring working, but it's just eluding me. I've made half a dozen attempts on fresh virtual machines and can never get this to work. :(
The reason is that python has already the library python-keyring installed which conflicts with the one installed with pip. Credits to Python library woes on Ubuntu 18.04 by Kai Koenig
Edit: the story actually did not end there because what it did was to get rid of that error but was not the actual solution. I had to continue with these commands
(yes, I installed it back)
That was taken from keyring docummentation. It turned out that my config folder shown by this command was not created so I did:
I had to create the .cfg file as well and put this inside (on my MacOS Mojave!):
Now everything works fine, no password asked anymore