You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Install method: Installed using the pip3 command on Ubuntu
OS Ubuntu 18.04
Current Behavior
If I ssh into a Linux machine and try to run jrnl to open a Journal that's encrypted I get the below traceback. This doesn't happen if I'm in a desktop environment (for example KDE or GNOME) on the same Linux machine. It appears that jrnl doesn't ask for the password when it can't access the KWallet/GNOME wallet system:
$ jrnl -from yesterday
WARNING: Python versions below 3.7 will no longer be supported as of jrnl v2.5
(the next release). You are currently on Python 3.6.9. Please update to
Python 3.7 (or higher) soon.
Traceback (most recent call last):
File "/usr/local/bin/jrnl", line 11, in <module>
sys.exit(run())
File "/usr/local/lib/python3.6/dist-packages/jrnl/cli.py", line 387, in run
journal = open_journal(journal_name, config)
File "/usr/local/lib/python3.6/dist-packages/jrnl/Journal.py", line 405, in open_journal
return EncryptedJournal.EncryptedJournal(name, **config).open()
File "/usr/local/lib/python3.6/dist-packages/jrnl/EncryptedJournal.py", line 55, in open
text = self._load(filename)
File "/usr/local/lib/python3.6/dist-packages/jrnl/EncryptedJournal.py", line 82, in _load
return util.decrypt_content(keychain=self.name, decrypt_func=decrypt_journal)
File "/usr/local/lib/python3.6/dist-packages/jrnl/util.py", line 70, in decrypt_content
pwd_from_keychain = keychain and get_keychain(keychain)
File "/usr/local/lib/python3.6/dist-packages/jrnl/util.py", line 93, in get_keychain
return keyring.get_password("jrnl", journal_name)
File "/usr/local/lib/python3.6/dist-packages/keyring/core.py", line 56, in get_password
return _keyring_backend.get_password(service_name, username)
File "/usr/local/lib/python3.6/dist-packages/keyring/backends/chainer.py", line 51, in get_password
password = keyring.get_password(service, username)
File "/usr/local/lib/python3.6/dist-packages/keyring/backends/SecretService.py", line 75, in get_password
collection = self.get_preferred_collection()
File "/usr/local/lib/python3.6/dist-packages/keyring/backends/SecretService.py", line 63, in get_preferred_collection
raise KeyringLocked("Failed to unlock the collection!")
keyring.errors.KeyringLocked: Failed to unlock the collection!
Expected Behavior
jrnl should see that the journal was encrypted using a key stored in a Keyring (Kwallet/Gnome Wallet etc) and, if the keyring is not available, prompt for the password to decrypt it.
Repro Steps
encrypt a journal using a password in a keyrng
try to access that journal when at a command-line session (i.e ssh login, or direct console login) and not in a desktop environment
Other Information
The text was updated successfully, but these errors were encountered:
This is a very good point. I can repro the same behavior on desktop by denying the keyring request.
Currently, jrnl checks if the correct entry exists in the keyring, then tries to access it. If the entry exists on the keyring, but keyring access fails, then the jrnl command also fails with the above error. I think it would be a very reasonable fallback to ask the user to manually enter the password if keyring retrieval fails.
wren
changed the title
keyring.errors.KeyringLocked: Failed to unlock the collection! at command line
jrnl fails if password exists in keyring, but retrieval fails for any reason
Aug 16, 2020
wren
changed the title
jrnl fails if password exists in keyring, but retrieval fails for any reason
Error if password exists in keyring, but retrieval fails for any reason
Aug 16, 2020
Bug Report
Environment
Current Behavior
If I ssh into a Linux machine and try to run jrnl to open a Journal that's encrypted I get the below traceback. This doesn't happen if I'm in a desktop environment (for example KDE or GNOME) on the same Linux machine. It appears that jrnl doesn't ask for the password when it can't access the KWallet/GNOME wallet system:
Expected Behavior
jrnl should see that the journal was encrypted using a key stored in a Keyring (Kwallet/Gnome Wallet etc) and, if the keyring is not available, prompt for the password to decrypt it.
Repro Steps
Other Information
The text was updated successfully, but these errors were encountered: