11

When I try to log in to Github I get this error: "The name org.freedesktop.secrets was not provided by any .service files".

How can I resolve my problem?

OS: Kubuntu 20.04 LTS

Kevin Bowen
  • 19,395
  • 55
  • 76
  • 81
Вадим
  • 223
  • 1
  • 2
  • 6
  • I use KDE, Artix (Arch) with runit. I just installed dbus-broker [(source)](https://bbs.archlinux.org/viewtopic.php?pid=2014580#p2014580): `yay -S dbus-broker`. It works right the way without even refreshing vscode. I know this is a ubuntu target stack but is the first result of my search `arch Writing login information to the keychain failed with error 'GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.secrets was not provided by any .service files`. I hope it can help someone else. – Griner Jul 04 '22 at 13:28

2 Answers2

10

Type command -v gnome-keyring. If the output is empty, run sudo apt install gnome-keyring. Maybe it's missing.

karel
  • 110,292
  • 102
  • 269
  • 299
  • Thanks, it works. But why doesn't git work with kde wallet? As i know, kde wallet is an analog of gnome-keyring, doesn't it? – Вадим Jul 05 '20 at 10:57
  • 1
    The decision to require gnome-keyring in order order to login to GitHub in Visual Studio Code would have been made by the Visual Studio Code package maintainer. If you installed Visual Studio Code from the Ubuntu Software app, the package is a snap package and the snap package maintainer is Microsoft. – karel Jul 05 '20 at 11:08
  • Ok, i understand – Вадим Jul 05 '20 at 11:23
  • There is an [issue about it in Visual Studio Code tracker](https://github.com/microsoft/vscode/issues/104319), and looks like it depends on [a bug fix at KDE](https://bugs.kde.org/show_bug.cgi?id=313216#c30), and there is not enough KDE contributors to fix this bug. – Konard Dec 19 '20 at 10:50
  • 1
    this worked for me when I was trying to connect to mongodb with vs code extendion +1 – Anurag Tripathi Sep 05 '22 at 05:57
4

Writing login information to the keychain failed with error 'The name org.freedesktop.secrets was not provided by any .service files'.

On KDE desktops (that don't have gnome-keyring installed), you also have the option to use KeePassXC as the Secrets Service.

The configuration steps for KeePassXC are:

  1. Optional. Install libsecret-tools. It contains a binary called secret-tool which can be used from the cli to test if things are working.

  2. In KeePassXC, open a database in which you want to hold the secrets and create a group inside the database. Can be named anything. e.g. 'Secret-Service-Integration'

  3. In KeePassXC, go to Tools > Settings > Secret-Service-Integration and check the Enable KeepassXC Freedesktop.org Secret Service integration check box. Press Ok to close the Application Settings screen.

  4. In KeePassXC, go to Tools > Settings > Secret-Service-Integration and in the General tab, in the Exposed database groups table, click the small pencil icon next to the database you want to host the secrets. Doing this will switch you to the Database's Settings dialog which also now has a Secret Service Integration section. Click on Secret Service Integration and then check the Expose entries under this group radio option. Select the group you created in step 2 above. Click Ok.

  5. Optional. Whilst the database is unlocked in KeePassXC, test storing a credential via:

secret-tool store --label='Created from cli' account test1

You will be prompted for a password and this is the password for the new secret being created and can be anything you want. e.g. 'blah'

If you now check the group set up in step 2 above, you will see a new KeePass entry in that group.

Doing the above allowed me to use Visual Studio Code's Settings Sync functionality without needing to install gnome-keyring.

Sources: