Post

VSCode GitHub Copilot Keyring Error on Arch Linux: 'The OS keyring is not available' Solution

VSCode GitHub Copilot Keyring Error on Arch Linux: 'The OS keyring is not available' Solution

If you’re using GitHub Copilot in VSCode on Arch Linux, you might suddenly hit this error:

1
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.

As a result, Copilot fails to authenticate, and you’re stuck without autocomplete magic. Luckily, the fix is simple and takes less than a minute.

🔍 What’s Going On?

This error happens when VSCode (and Copilot) tries to save your GitHub token securely, but there’s no keyring service running. On Arch Linux (especially minimal setups without full GNOME), gnome-keyring and libsecret may not be installed by default.

✅ The Quick Fix

All I did was run:

1
sudo pacman -S gnome-keyring libsecret

Then I restarted VSCode, and the error disappeared. ✨

🔐 What Happened After?

Upon restart, Copilot asked me for a password to unlock the keyring. I didn’t have one yet, so I just typed in a password of my choice. That created a new local keyring for storing secrets.

💡 Tip: You can choose any password you like — just make sure you remember it, as VSCode might ask for it again in the future.

After that, GitHub Copilot logged in successfully, and autocomplete started working like a charm.

🧠 Why It Works

VSCode extensions like GitHub Copilot use keytar behind the scenes to save credentials. On Linux, keytar relies on libsecret, which requires a running keyring backend like gnome-keyring.

Arch doesn’t include these tools unless you explicitly install them. So the fix is just a matter of satisfying this dependency.

📌 Summary

If GitHub Copilot won’t start and you’re seeing a keyring error in VSCode on Arch Linux:

  1. Install the required libraries:

    1
    
    sudo pacman -S gnome-keyring libsecret
    
  2. Restart VSCode.

  3. Enter a password when prompted to unlock the keyring.

That’s it — Copilot will authenticate and work as expected.

This post is licensed under CC BY 4.0 by the author.