git: error: gpg failed to sign the data

If you try to sign commit with git, and you get the following error:


error: gpg failed to sign the data
fatal: failed to write commit object
  1. Check your ~/.gitconfig file, which must include at least the following sections:
    name = Your Name Here
    email =
    #key ID coming from gpg --list-keys
    signingkey = AABBCCDDFF112233445566
    gpgsign = 1
    #could be gpg or gpg2 or full path to them
    program = gpg2
  2. If above is fine, check if your GPG is working correctly on the following link:
 gpg or gpg2 gpg: signing failed: Inappropriate ioctl for device 

No comments:

Post a Comment