2

Trying to create new secrets in the GNOME keyring via auth-source results in

The Secrets API auth-source backend doesn’t support creation yet

How can I manually create this secret?

  • This is a known restriction, see debbugs.gnu.org/30246 . It's on my todo list, with slow progress. – Michael Albinus Apr 1 '18 at 7:40
  • I saw that! This is simply a stop gap measure in the meantime that I've had to use a couple of times – Felipe Apr 1 '18 at 14:01
1

The first thing to do is confirm which fields need to be included in the secret. Frequently this includes host and user. For smtp, this also includes port. You can find this information by looking for an auth-source-search call (or using edebug to pause execution on it).

If all you need is host and user, you can use a graphical client like Seahorse if you have it already. Otherwise, you can manually create the secret using Python and secretstorage as follows:

import secretstorage
bus = secretstorage.dbus_init()
collection = secretstorage.get_default_collection(bus)
fields = {'field1': 'field1-value', 'field2': 'field2-value'}
secret = input('Enter secret followed by RET: ')
collection.create_item("Secret name", fields, secret)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.