Repository navigation
Ubuntu keychain support is broken #2165
Copy link
Copy link
Open
Labels
area:authenticationLogin, OAuth, device auth, token management, and keychain integrationLogin, OAuth, device auth, token management, and keychain integrationarea:platform-linuxLinux-specific: Wayland, X11, Ubuntu, Fedora, Alpine, ARM, terminal emulatorsLinux-specific: Wayland, X11, Ubuntu, Fedora, Alpine, ARM, terminal emulatorsmore-info-needed
Description
Describe the bug
There are two bugs:
- 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-toolis not installed, runningsudo apt install libsecret-1-0 gnome-keyring seahorsedoesn't install it. You also need to runsudo apt install libsecret-tools(please fix the docs) - Once
secret-toolis correctly installed, as confirmed bycommand -v secret-tool, Copilot-CLI still fails to findsecret-tooland 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
- Make sure
secret-toolis installed, by runningcommand -v secret-tool: - start Copilot CLI by running
copilot - login with
/login(in my case, this requires quite a few clicks since I use the SSO login of my organization) - 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 seesecret-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
Reacted by Dominik Bartholdi, Rutger, Axell Padilla, Anthony Medina, Amund Vedal, olegs-kuznecovs, Anders, nivek2008, AlexanderSchmid2341, Evgenii Shubin and 12 more
Metadata
Metadata
Assignees
Labels
area:authenticationLogin, OAuth, device auth, token management, and keychain integrationLogin, OAuth, device auth, token management, and keychain integrationarea:platform-linuxLinux-specific: Wayland, X11, Ubuntu, Fedora, Alpine, ARM, terminal emulatorsLinux-specific: Wayland, X11, Ubuntu, Fedora, Alpine, ARM, terminal emulatorsmore-info-needed
Activity
gdkrmr commentedon Mar 20, 2026
can confirm the issue
PMPP commentedon Jun 27, 2026
I was having the same issue with
wsl+Ubuntu 24.04.4 LTSafter following the instructions.I indeed did not have
secret-toolinstalled 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 -yThe reason I skipped
seahorseis 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). Andcopilot 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 value2I was prompted for the
passwordI 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:You can remove this dummy secret running:
And now when I try to run
copilot loginI then shutdown my
wslinstance through my hostcmdI open my
wslonce again, and try to runcopilotand I am presented with the following prompt:This solved it for me, I hope it helps others.
cameronfrye-eaton commentedon Jul 14, 2026
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.
patniko commentedon Oct 26, 2026
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.
MikeAtEffectual commentedon Oct 28, 2026
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 providessecret-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.