after updating WSL Ubuntu i can't do sudo apt-key add
with an error:
gpg: can't connect to the agent: IPC connect call failed
Uninstall the gpg that comes installed by default and install gnupg1 package instead
sudo apt remove gpg
sudo apt install gnupg1
This appears to be a known bug in WSL. You can try adding the key manually using:
curl -sL "http://keyserver.ubuntu.com/pks/lookup?op=get&search=YOUR_KEY_HERE" | sudo apt-key add
YOUR_KEY_HERE
is the GPG key the package you need wants to install. An example would be: 0xA6A19B38D3D831EF
curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg -vv --dry-run --import -
Jun 25, 2020 at 17:07