Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 3
    but how do i get the '<key-fpr>' ? In what format? When I do 'gpg -K' it prints long ID with spaces. Commented Jun 29, 2020 at 6:27
  • @400 take the “Key fingerprint” line from gpg -K and use the value after the = sign; you can include the spaces, so copy-paste works, you don’t even need quotes. Commented Jun 29, 2020 at 6:54
  • 3
    your output must be different. I see 4 lines: 1) sec rsa4096 ..., 2) what I think is the key id, ie: ffff ffff ffff ffff ffff ffff ffff ffff ffff ffff, but there is no = sign, 3) my name and email, 4) ssb rsa4096 ... Commented Jun 29, 2020 at 7:41
  • @400 weird, I see a “Key fingerprint” line on all the platforms I’ve checked this on. Anyway, that long value is probably your fingerprint, not your key id, and you can use that as the default-key value. (Key ids are the values given with rsa4096 etc.) Commented Jun 29, 2020 at 7:45
  • 1
    I see the same output as @400theCat on Debian, gpg 2.2.27. The long value is the fingerprint, the last 16 chars of that is the long key id, and the last 8 chars is the short key id. You can also get the long key ids with gpg --list-signatures or the short key ids with gpg --list-signatures --keyid-format short. Anyway, the default-key option works with any of those options (fingerprint, long id, or short id). Commented Aug 2, 2021 at 13:31