Open hxjuneja opened 8 years ago
I have not tested gnupg 2.1, but mig should already talk to gpg-agent if the socket is present. Did you verify that this isn't working as expected?
in newer GPG the socket is no longer advertised by the environment so I suspect its not being picked up i suspect --extra-socket option of the agent can be used as a work around, while manually setting the env to point to it for ex.
Alternatively the standard socket path is always: /run/user/UID_HERE/gnupg/S.gpg-agent (though the go lib doesnt seem to be able to pick it up even if its provided in env GPG_AGENT_INFO)
I'm using a separate folder for my investigator key and I've worked around this with:
gpg --export-secret-keys > my_gpg_folder/secring.gpg
I'm doing the same though it's annoying to have to type the passphrase every time ;-)
The method from @kpcyrd really works, but need to copy xxxxx.key in private-keys-v1.d/ folder to the same place with secring.gpg. It would be better to support GNUPG 2.x
any updates on this?
Currently, MIG is only compatible with GNUPG version 1.x and 2.x and looks for a secring.pgp on startup. In the GNUPG version 2.1 secring.gpg file is not used anymore and only gpg-agent is responsible for the private parts of the keys.
It will be nice to make MIG compatible with GNUPG 2.1 while maintaining the support for version 2.x and 1.x. This can be implemented either by asking gpg-agent for the keys when secring.gpg is not found or by looking for GNUPG version upfront and proceeding accordingly.
For more info about the changes in version 2.1 see:
https://www.gnupg.org/faq/whats-new-in-2.1.html