Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Code asking to authenticate 'Default keyring' everytime I start

I started using Linux lite 5.0 on my laptop last month. (I am fairly new to the Linux enviroment, just migrated from Windows 10).

So I installed Visual studio Code using snap and everytime I start it up, it asks to authenticate 'Default Keyring' until next reboot.

Is there anyway I can authorize it so I don't have to authenticate it everytime i reboot my pc?

(p.s the reason i moved from windows to linux is because my pc got hacked some weeks prior, so please consider security a major concern here)

Thanks in advance :)

like image 916
Munish-Soni Avatar asked Jul 27 '20 02:07

Munish-Soni


People also ask

How can I stop being prompted to unlock the default keyring on boot?

Open Applications -> Accessories -> Password and Encryption Keys. Right-click on the "login" keyring. Select "Change password" Enter your old password and leave the new password blank.

How do I turn off keyring?

Disable keyring passwordOpen Password and Keys application and go on to change the keyring password. The trick is that when it asks to change the password, don't enter a new password and hit Continue instead. This will remove any password from the keyring.


2 Answers

For anyone using VSCode on Windows / WSL - this is the solution https://github.com/MicrosoftDocs/live-share/issues/1782#issuecomment-1053563079

Go to your wsl terminal and install seahorse if you don't have it.

sudo apt-get update && sudo apt-get install seahorse

Run seahorse

seahorse

You should see a popup for GnuPG keys. Click on the back button, then right-click on default keyring, and click delete. After entering your keyring password, your default keyring should be gone.

But now vscode asks you to create one every time. To fix this remove gnome-keyring:

sudo apt-get remove gnome-keyring

Credits go to Austin Jerry (upsurge0)

like image 160
nsimeonov Avatar answered Nov 02 '22 06:11

nsimeonov


In GDM+GNOME, when you login, GNOME Keyring is automatically unlocked. However, it doesn't do so in SDDM+KDE. When you start some GNOME or Electron application like VS Code, they ask you to type the login password again.

The solution is to edit /etc/pam.d/sddm and add pam_gnome_keyring.so like this (the second line and last line):

#%PAM-1.0
auth     include        common-auth
auth     optional       pam_gnome_keyring.so
account  include        common-account
password include        common-password
session  required       pam_loginuid.so
session  include        common-session
session  optional       pam_gnome_keyring.so auto_start

This is a solution that I found here that should work for you. For me, the lines were already there, but I simply had to remove the - at the beginning of the lines.

EDIT: To edit the file, you'll need root privileges, so I did sudo -e /etc/pam.d/sddm in terminal, edited the lines, hit CTRL+X, and Y to save.

like image 40
Leonivek Avatar answered Nov 02 '22 06:11

Leonivek