Score:1

Asking for password when I open VSCode for the first time

gb flag

When I turn on my PC and open VSCode it asks me for the password saying:

Enter password to unlock your login keyring
The login keyring did not get unlocked when you logged into your computer.

There exist a number of cases of the same situation online but I've never stumbled on the problem with VSCode specifically.
I know the "problem" is with the keyring but why only on VSCode I get this?

EDIT: I have Ubuntu 20.04 and Automatic Login is turned On.

Score:2
in flag

With automatic login, the keyring does not get unlocked when you login.

Whenever a program saves its password to the keyring and tries to access it, the keyring will ask for its password which is by default the same as the login passord.

That is e.g. the case for chrome/ium or ssh-agent. I don't know what vscode/ium is doing in your case, maybe it tries to access some git repository via ssh connection (so, it might be actually ssh-agent trying to access an ssh-key(?)) or it wants to access some saved git or ssh passwords in the keyring. It might also come from a plugin, e.g. I saw reports that Live Share can cause this.

Possible solutions:

  • Do not use automatic login, then the keyring will get automatically unlocked with your login.
  • Remove the password from the keyring to avoid the popup. However, you need to be aware of the security implications. I would only do this if you're the only user of your system and use Full Disk Encryption.

See also: How can I stop being prompted to unlock the 'default' keyring on boot?

Comzyh avatar
ge flag
Disable liveshare extension works for me.
Score:0
tw flag

Until this misbehaving app gets fixed, simply run code --password-store=basic - works at least with code v1.80. It instructs the embedded electron to use its own password store instead of the gnome-keyring stuff.

Another not so good idea is to rename the app used to get the passphrase, on Ubuntu 20.04 e.g. sudo mv /usr/libexec/gcr-prompter /usr/libexec/gcr-prompter.disabled. Other apps which wanna use gnome-keyring would not be able to get the passphrase this way, too.

If you do not care about gnome-keyring at all, you may remove the package gcr (e.g. sudo apt-get purge gcr), which probably removes other packages you may need. So study its output before saying 'yes' ;-).

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.