question

rohanpandole-8211 avatar image
0 Votes"
rohanpandole-8211 asked TimonYang-MSFT edited

how to change my default gnupg keyring location to different location in windows

I am new to GnuPG, I want to change my gpg keyring location from Home: C:/Users/Rohan/AppData/Roaming/gnupg to C:\Program Files (x86)\GnuPG\bin, on internet there is some method to do it but I am not getting it because there are some solution based on older gpg version.

121394-screenshot-117.png


121395-screenshot-119.png


I want to place my keyring(pubring.kbx file which contains both public key and private key) to gpg.exe path like C:\Program Files (x86)\GnuPG\bin

My gpg command string is like:

--homedir "C:\Program Files (x86)\GnuPG\bin" --pinentry-mode loopback --passphrase-fd 0 --output E:\sample.txt --decrypt E:\sample.txt.gpg

So when I run gpg decryption process from C# program it will fetch the secret key from gpg.exe location C:\Program Files (x86)\GnuPG\bin



121434-screenshot-120.png



What I tried to do but I got gpg:decryption failed:No secret key

  1. tried to copy all files from the location C:/Users/Rohan/AppData/Roaming/gnupg to C:\Program Files (x86)\GnuPG\bin

Any suggestion will be helpful to me.


not-supported
screenshot-117.png (94.3 KiB)
screenshot-119.png (119.9 KiB)
screenshot-120.png (143.8 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@rohanpandole-8211
Thank you for posting the question here.
But this is not a problem that c# can solve, but a problem about the third-party application gnupg. It is difficult for us to answer your question because many people may not have experience in using this application.
I suggest you go to StackOverflow to ask your question with the gnupg tag.

0 Votes 0 ·

0 Answers