. Advertisement .
..3..
. Advertisement .
..4..
Hello, everyone. I just get an error message about”gpg failed to sign the data” after I set up GPG and attempt to commit it. Below is the problem I have:
error: gpg failed to sign the data
fatal: failed to write commit object
If everyone has any methods to resolve this issue, please show me how to solve it. Thanks!
The cause:
The first reason is the expiry of your GPG.
Another one is not to set the secret key correctly.
Solution:
With the 1st reason, of course, you must extend the date of using the GPG.
With the 2nd one, the message said
gpg: signing failed: No secret key
in below situation because the key which was set isn’t looking for.Then, you have to install the GPG key in Git again:
2. Copy the key.
3. Put your key in git for your user.
That is all and I hope it will help you. Good luck!!!