$ git tag -u KKKKKKKK -m "Tagging <program> vM.NN" TAGWhere:
error: gpg failed to sign the data
error: unable to sign the tag
- "KKKKKKKKK" is the keyid being used to do the signing.
- "<program>" is the name of the program in the example commit message for the tag.
- "vM.NN" is the version number for the program in the commit message for the tag.
- "TAG" at the end is the tag that is being set.
Same thing happened with a different git repository. This is on a system running Debian 9.
I'd had no problem doing the same thing in a different git repository quite recently.
$ export GPG_TTY=$(tty)Adding that allowed me to do it when logged in directly on the system itself but not when using ssh to log in remotely.