Search code examples
powershellgnupg

gpg with powershell


I used gnupg version 1.4 and this code in powershell to decrypt encrypted file worked fine:

echo mypassphrase | C:\gpg.exe --passphrase-fd 0 --output c:\list.xls --decrypt c:\gnupg\crypted\list.gpg

Now I've installed GNUPG2 and it doesn't work anymore. The only thing that changed is gpg.exe to gpg2.exe

When I run this command via command line it stucks here:

You need a passphrase to unlock the secret key for
user: "Marcel Seln (MS) <mseln@seln.sk>"
2048-bit RSA key, ID ED189121, created 2012-03-02 (main key ID 792EF596)

(only thing that helps is ctrl+c to interrupt command)

Thank you.


Solution

  • I found out that this problem occures too, when I use GNU Privacy Assistent. It freezes and CPU consumption was at 100%. I don't know why this happens on my brand new Windows server 2003 virtual machine, but when I restarted it, everything works fine. There is no suspicious event in Event log.. Thank you for your time!