This site is for tech Q&A. Please keep your posts focused on the subject at hand.

Ask one question at a time. Don't conflate multiple problems into a single question.

Make sure to include all relevant information in your posts. Try to avoid linking to external sites.

Links to documentation are fine, but in addition you should also quote the relevant parts in your posts.

1 vote

I need to add GPG key information to a (Puppet) config, but I want to avoid having to import the key into my keyring and then delete it again, just to get the key ID/fingerprint. How do I get that information without actually importing the key?

in General by (330) 2 9
edited by

Your answer


Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
By submitting this post you agree to our Terms & Conditions.
To avoid this verification in future, please log in or register.

1 Answer

0 votes

In older GPG versions you had to run the command with the option --with-fingerprint to have it show the fingerprint of a key file:

gpg --with-fingerprint foo.asc

In newer versions (2.2 and above, I believe) the fingerprint will be shown by default and will not be shown when using that option, so the parameter must be omitted:

gpg foo.asc
by (330) 2 9
edited by