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:
    [user]
    name = Your Name Here
    email = your@email.com
    #key ID coming from gpg --list-keys
    signingkey = AABBCCDDFF112233445566
    [commit]
    gpgsign = 1
    [gpg]
    #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

Comment