libsecret is needed because keytar is a dependency of vscode - and it's used to store secrets.
HOWEVER, there's a fallback if it can't store creds in the OS store (what libsecret is used for) - that uses memory. It shows a log message in the console, but code-server (and vscode) are fully functional without it, thanks to that fallback built-in into vscode.
Activity
jsjoeio commented on Sep 6, 2022
Thanks for bringing this up @edvincent 🌮
My thinking:
If we did this 3, wouldn't be necessary right?
@code-asher what are your thoughts?
edvincent commented on Sep 6, 2022
Correct - I'm all for the most lightweight install for the basic features, so not forcing libsecret is a bit better.
Ideally vscode would do the optionalDependency upstream, but I'm not sure we can convince them too... Hence the "hack".
What I can propose is to send them a PR explaining the rationale, and depending on the outcome there, bring the hack or not?
Unless we want to fix it quickly in here (before we bring the next vscode release), and want to bring back the hack in parallel?
jsjoeio commented on Sep 6, 2022
I think working in parallel - sending PR upstream and adding our hack back in the meantime - seems like the best approach 👍🏼 Let's go with that!
code-asher commented on Apr 7, 2026
Closing since keytar is an optional dependency now. Not sure it is even used in the web build anymore.
Edit: actually I misread something, it is not optional, it seems to have been removed entirely. microsoft/vscode@5134662