Migrate Gnupg

Migrate Gnupg

In old system, run
gpg --export-secret-key > allkeys.txt
gpg --export > pubkeys.txt

Copy allkeys.txt and pubkeys.txt to the new system.

In new system, download Gpg4win-Vanilla 2.3.0 and install it.

After install, run the following commands:
gpg2 --allow-secret-key-import --import allkeys.txt
gpg2 --import pubkeys.txt

To disable interactive session for untrusted pub key, do this:
gpg2 --edit-key DCXLMS

Type trust. Then, select 5, type y and save.

Now, you should be able to run commands in the background.