3

So I'm just trying to sign my LibreOffice documents digitally. I have generated my GPG key in a Debian WSL terminal using the gpg command line. Yet when I access my LibreOffice documents, File → Digital Signatures → Digital Signatures → Sign Documents, the key generated isn't available (none is shown).

I also tried to import the key from the WSL to Windows with Kleopatra but when I click on Import… and try to import the trustdb.gpg file located in /home/UserName/.gnupg/, it doesn't import anything at all (imported : 0).

Maybe there is something I misunderstood. I'd like to know if it's possible to import a GPG key from WSL to be used in Windows directly or to use it directly from the WSL, it doesn't really matter.

Nicryc
  • 765

2 Answers2

2

Thanks to dave_thompson_085 comment, I exported my key [private.pgp] from WSL, imported it into Kleopatra, and I was able to sign my LibreOffice documents:

gpg --output private.pgp --export-secret-key user.name@email.com
JW0914
  • 9,096
Nicryc
  • 765
1

I have a quite hacky solution (but it works), if you're on WSL1 and have Gpg4Win installed (given you've already got Kleopatra): leverage symbolic links.

In WSL, run ln -s /mnt/c/Users/(You)/.gnupg ~/.gnupg.

Then create or import keys to your WSL environment as you would normally do.

Therefore WSL should share the same GPG profile as in your Windows environment.

Melonee
  • 21