wsldl-pg / ArchW-docs

ArchWSL documentation project
https://git.io/arch-doc
Creative Commons Attribution 4.0 International
54 stars 22 forks source link

GPG keys can't decrypting the files #48

Closed IAteNoodles closed 8 months ago

IAteNoodles commented 8 months ago

I have been using pass to store my passwords, but on wsl when I use the pass show XYZ I get gpg: decryption failed: No secret key

I have tried changing the perms, onwerships but nothing works, and I think this is an inherit drawback of wsl, I may be wrong.

I to be sure, tried using this on a native linux machine and it worked.

I even created a new gpg key and used it to encrypt and decrypt a message, but I got the same error.

sileshn commented 8 months ago

pass works fine on wsl2. I tried it on debian, manjaro and archlinux.

IAteNoodles commented 8 months ago

pass works fine on wsl2. I tried it on debian, manjaro and archlinux.

Are you able to enter your paraphrase? Can you please tell me your setup in archlinux apart from pass what are the things are you using?

sileshn commented 8 months ago

Have you setup pinentry? If not, you will need to set it up to display the dialog to enter your paraphrase.

sudo pacman -S pinentry echo 'export GPG_TTY=$(tty)' | tee -a /home/$USER/.bashrc echo 'pinentry-program /usr/bin/pinentry-curses' | sudo tee -a ~/.gnupg/gpg-agent.conf echo RELOADAGENT | gpg-connect-agent /bye

IAteNoodles commented 8 months ago

Have you setup pinentry? If not, you will need to set it up to display the dialog to enter your paraphrase.

sudo pacman -S pinentry echo 'export GPG_TTY=$(tty)' | tee -a /home/$USER/.bashrc echo 'pinentry-program /usr/bin/pinentry-curses' | sudo tee -a ~/.gnupg/gpg-agent.conf echo RELOADAGENT | gpg-connect-agent /bye

I tried your way, but it didn't do anything, Tho I reinstalled the wsl and it worked.