I use GPG to sign Git tags.

This is a list of signing errors I encountered and possible solutions.

# Error:
$ git tag --sign --message 'Release 2023.07.13' 2023.07.13
# --snip--
gpg: signing failed: No pinentry
error: unable to sign the tag

# Problem:
# This can happen in a container if GPG cannot find a tool to ask the user for a passphrase.
# https://www.gnupg.org/documentation/manuals/gnupg/Invoking-GPG_002dAGENT.html

# Solution:
dnf install pinentry
# Error:
$ git tag --sign --message 'Release 2023.07.13' 2023.07.13
# --snip--
gpg: signing failed: Inappropriate ioctl for device
error: unable to sign the tag

# Problem:
# Missing environment variable for the gpg-agent.
# https://www.gnupg.org/documentation/manuals/gnupg/Invoking-GPG_002dAGENT.html

# Solution:
export GPG_TTY=$(tty)