Guidelines

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
370 views
370 views

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 Sysadmin
edited by
by (100)
1 13 28
edit history

Please log in or register to answer this question.

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

edited by
by (100)
1 13 28
edit history
...