0

I don't know much about how yubikeys work, but I'm trying to sign a commit with one of them and I don't even know how to debug the problem. I got:

gpg --list-keys
/home/lz/.gnupg/pubring.kbx
---------------------------
pub   ed25519 2018-11-30 [SC]
      123456...ABCDEF
uid           [ unknown] proton@srp.modulus
sub   cv25519 2018-11-30 [E]

and

git commit -m "hdle" -S 
error: gpg failed to sign the data
fatal: failed to write commit object

and

gpg --status-fd=2 -bsau 'MyName <myname@protonmail.com>'
gpg: skipped "MyName <myname@protonmail.com>": No secret key
[GNUPG:] INV_SGNR 9 MyName <myname@protonmail.com>
[GNUPG:] FAILURE sign 17
gpg: signing failed: No secret key

PS: SSH login works with yubikey

UPDATE:

echo "test" | gpg --clearsign
gpg: no default secret key: No secret key
gpg: [stdin]: clear-sign failed: No secret key
8
  • I find it easier to troubleshoot by first trying to sign a generic message (rather than a commit) first, using echo "test" | gpg --clearsign. Jun 2 at 1:57
  • @keithRozario added an update
    – Rafaelo
    Jun 2 at 11:33
  • What do you get with "gpg --list-secret-keys"? Jun 2 at 12:34
  • @thenickdude empty response
    – Rafaelo
    Jun 2 at 17:39
  • @thenickdude how can I do SSH if I have no secret keys?
    – Rafaelo
    Jun 2 at 17:40

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.