As you see, I have a key with id 12345689, and I'm trying to sign with it in git
gpg -k/home/lz/.gnupg/pubring.kbx---------------------------pub rsa4096 2020-03-02 [C] 12345689uid [ unknown] Person Person <me@person.com>sub rsa4096 2020-03-02 [S] [expires: 2024-03-01]sub rsa4096 2020-03-02 [E] [expires: 2024-03-01]sub rsa4096 2020-03-02 [A] [expires: 2024-03-01]
But git considers this key ID unusable:
gpg2 --status-fd=2 -bsau 12345689 1[GNUPG:] KEY_CONSIDERED 12345689 1gpg: skipped "12345689": Unusable secret key[GNUPG:] INV_SGNR 9 12345689[GNUPG:] FAILURE sign 54gpg: signing failed: Unusable secret key
as I researched, it's because it contains [C]
which is not for signing. I think I should use the subkey with [S]
but how do I use it? I don't know how to get its ID. gpg -k
does not show their IDs