Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS Code GitHub Auth Not Working on Linux due to GNOME Environment OS Keyring Error

I'm trying to login to GitHub on VS Code on Ubuntu, but I'm getting the error:

You're running in a GNOME environment but the OS keyring is not available for encryption. Ensure you have gnome-keyring or another libsecret compatible implementation installed and running.

After waiting for a bit, my GitHub still logs in, however if I open a new VS Code page I have to go through this login process again.

Moreover, the GitHub login popup doesn't appear when I try to sign in with VS Code; instead, I have to sign in with a code, which is frustrating. Not sure if these two things are related or not.

Do you happen to know what I can do such that I can login to GitHub on VS Code without these problems appearing?

like image 975
ansgup Avatar asked May 22 '26 06:05

ansgup


2 Answers

This error in Visual Studio Code occurs because the GNOME keyring, which is used to store credentials securely, is not available or is not running correctly. You can get more context on this known issue at: https://code.visualstudio.com/docs/editor/settings-sync#_troubleshooting-keychain-issues

Anyway, in my case it was from Linux. So, start approaching it as follows until you get it resolved:

  1. code --verbose --vmodule="/components/os_crypt/=1" (This for the diagnosis)

  2. Check if gnome-keyring is installed

    sudo apt update

    sudo apt install gnome-keyring

  3. Make sure gnome-keyring is running:

    ps aux | grep gnome-keyring

    If not running:

    gnome-keyring-daemon --start --components=pkcs11,secrets,ssh,gpg

  4. Check if the libsecret library is installed:

    sudo apt install libsecret-1-0 libsecret-1-dev

  5. Configure VSCode to use gnome-keyring:

Once gnome-keyring is installed and running, open VSCode and find the configuration file (settings.json) and add the following configuration to enable GNOME Keychain storage.:

> "security.workspace.trust.enabled": true
  1. Restart VSCode

Hope it helps someone else!

like image 158
Gustavo IAS Avatar answered May 24 '26 19:05

Gustavo IAS


I just installed Ubuntu 25.04 and ran into the same issue.

In my case, the GNOME keyring wasn’t starting automatically. I noticed this when I searched for “Password and Keys” in the application menu – it failed to open properly.

Here's how I fixed it:

  1. Open the Startup Applications menu.

  2. Click Add.

  3. Add this command:

    /usr/bin/gnome-keyring-daemon --start --components=ssh
    

    enter image description here

    Note: You can use ssh, pkcs11, or secrets in --components= depending on your needs.

  4. Restarted the computer.

After this, VS Code correctly detected the GNOME keyring, and GitHub login started working as expected.

like image 36
Rosiel Victor Avatar answered May 24 '26 20:05

Rosiel Victor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!