Skip to content

Ubuntu keychain support is broken #2165

Open

Description

@AndreaPi

Describe the bug

There are two bugs:

  1. the documentation https://docs.github.com/en/copilot/how-tos/copilot-cli/set-up-copilot-cli/troubleshoot-copilot-cli-auth#keychain-access-failure is wrong. Under Ubuntu (see below for version), If secret-tool is not installed, running sudo apt install libsecret-1-0 gnome-keyring seahorse doesn't install it. You also need to run sudo apt install libsecret-tools (please fix the docs)
  2. Once secret-tool is correctly installed, as confirmed by command -v secret-tool, Copilot-CLI still fails to find secret-tool and use it. I tried to log out of my SSH connection to Ubuntu, log in again and try again: didn't help

Affected version

GitHub Copilot CLI 1.0.9

Steps to reproduce the behavior

  1. Make sure secret-tool is installed, by running command -v secret-tool:
  2. start Copilot CLI by running copilot
  3. login with /login (in my case, this requires quite a few clicks since I use the SSO login of my organization)
  4. Copilot CLI complains that The system vault (keychain, keyring, password manager, etc.) is not available. You may need to install one. So it actually doesn't see secret-tool. Please fix

Expected behavior

When secret-tool is installed and I run copilot, then /login, Copilot CLI should be able to see secret-tool and safely store my token in the keychain, instead of prompting me to accept the risk and store the token in the plain text config file instead

Additional context

Linux version:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 24.04.1 LTS
Release:        24.04
Codename:       noble

I'm connecting to Ubuntu from Windows via SSH with the Windows Terminal. The remote Ubuntu server is a headless server, but I would expect a key manager to work (once installed) regardless of that

Activity

  1. added theissue type on Mar 19, 2026
  2. gdkrmr commented on Mar 20, 2026

    @gdkrmr

    can confirm the issue

  3. added
    area:platform-linuxLinux-specific: Wayland, X11, Ubuntu, Fedora, Alpine, ARM, terminal emulators
    on Apr 6, 2026
  4. added
    area:authenticationLogin, OAuth, device auth, token management, and keychain integration
    on Apr 6, 2026
  5. PMPP commented on Jun 27, 2026

    @PMPP

    I was having the same issue with wsl + Ubuntu 24.04.4 LTS after following the instructions.
    I indeed did not have secret-tool installed in my distro.

    I installed it with the following command contrary to what was suggested by GitHub Docs:

    sudo apt update && sudo apt install libsecret-tools gnome-keyring -y

    The reason I skipped seahorse is that it's an UI for the password manager, the GitHub docs are probably targeting people with a desktop experience.

    The reason we get System keychain unavailable. Store token in plaintext config file? (y/N) it's because we never initiated our keyrings (the encrypted database with all our keys). And copilot login (at least in my case) does not trigger the creation of the default, which requires some user input, like providing a password for the keyring.

    To start the creation of the default keyring I ran:

    secret-tool store --label="My First Secret" something1 value1 something2 value2

    I was prompted for the password I wanted to store. And then right after I was presented with a GUI Popup to pick the password I wanted to use for my default keyring:

    Image

    You can remove this dummy secret running:

    secret-tool clear something1 value1 something2 value2

    And now when I try to run copilot login

    pmpp@pmpp:~$ copilot login
    To authenticate, visit https://github.com/login/device and enter code XXXX-XXXX.
    Waiting for authorization...
    Failed to open browser. Please visit https://github.com/login/device and enter the code XXXX-XXXX manually.
    Signed in successfully as PMPP.

    I then shutdown my wsl instance through my host cmd

    wsl --shutdown

    I open my wsl once again, and try to run copilot and I am presented with the following prompt:

    Image

    This solved it for me, I hope it helps others.

  6. cameronfrye-eaton commented on Jul 14, 2026

    @cameronfrye-eaton

    I am having a similar issue to this but using Windows with WSL on Ubuntu 24.04 LTS.

    Following along with PMPP's reply, I can get up to the part where I create a dummy secret, but the popup to enter a password does not come up which I'm assuming is because WSL does not have a proper gui. I can see the popup trying to work as an icon comes up in the windows taskbar, but it is not working properly.

    Image Image
  7. patniko commented on Oct 26, 2026

    @patniko
    Collaborator

    Thanks for the report. We've shipped fixes in this area since this was filed (most recently in Copilot CLI v1.0.100), and we believe this may now be resolved. Could you retest on the latest release (Copilot CLI v1.0.103) and let us know whether you still see it? If we don't hear back in a couple of weeks, we may close this issue — you can always reopen it.

    Triaged as part of a Copilot SDK backlog review, with help from GitHub Copilot.

  8. MikeAtEffectual commented on Oct 28, 2026

    @MikeAtEffectual

    I just ran into this running Copilot CLI 1.0.105 on Ubuntu (WSL2). After installing libsecret-tools (which is missing from the docs and provides secret-tool), Copilot was still unable to use it.

    Storing a bogus secret to force the creation of a keychain seems to have fixed it.

    Unfortunately, the error message provided by Copilot didn't match the problem. I would expect Copilot to gracefully handle a missing default keychain, either by telling the user that is the problem or offering to create one for them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:authenticationLogin, OAuth, device auth, token management, and keychain integrationarea:platform-linuxLinux-specific: Wayland, X11, Ubuntu, Fedora, Alpine, ARM, terminal emulatorsmore-info-needed

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions