I was trying to use the '--export-ssh-key' functionality as described in:
https://gnupg.org/faq/whats-new-in-2.1.html#sshexport
However, when I try to use it with the latest version of gpg 2.1.16 I get the following
assertion thrown. gpg was installed with the latest homebrew install (released today)
on macOS.
I have tried several different ways to specify the ID but all have failed the same way
for me.
$ gpg2 --list-key A4A288A3BECCAE17
pub rsa4096/0xA4A288A3BECCAE17 2014-10-02 [C] [expires: 2019-10-01]
Key fingerprint = 497A 6138 963D 6C47 202B 238B A4A2 88A3 BECC AE17
uid [ultimate] Glenn Rempe <glenn@rempe.us>
uid [ never ] [jpeg image of size 1740]
sub rsa2048/0x85C81023D9E3FC2F 2015-06-04 [S] [expires: 2019-09-11]
sub rsa2048/0x2992317D667E3936 2015-06-04 [E] [expires: 2019-09-11]
sub rsa2048/0x19EA4BEADCC31080 2015-06-04 [A] [expires: 2019-09-11]
$ gpg2 --export-ssh-key A4A288A3BECCAE17
gpg: Ohhhh jeeee: Assertion "ret_found_key == NULL || ret_keyblock != NULL" in lookup
failed (getkey.c:3677)
[1] 52568 abort gpg2 --export-ssh-key A4A288A3BECCAE17
$ gpg2 --version
gpg (GnuPG) 2.1.16
libgcrypt 1.7.3
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later https://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Home: /Users/glenn/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2