How do i verify a gpg signature (cli or w/ node js) without installing the public key? i do have the public key but don’t want to add it to the keyring. Any hints?
Thanks,
Florian
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here’s a shell script I use for just that purpose. It creates a temporary keyring, installed the specified public key in it, runs the specified command, then deletes the temporary keyring.
Note that this installs the key from a keyserver. It shouldn’t be hard to tweak it to use a key you already have on disk (and I should add an option to do just that).
Update: See https://github.com/Keith-S-Thompson/gpg-tmp
It acts like the
gpgcommand, but takes an extra initial argument specifying the 8-digit key id.Sample usage:
Keep in mind that this tells you absolutely nothing about the trustworthiness of the key, but it’s useful as an integrity check.
(I wonder how many keys Jim Meyering generated before he got that one.)