[Git](EN) Solution to issue which appears "gpg failed to sign the data" when sign with gpg key

Post about solving issue which appears “gpg failed to sign the data” when sign with GPG key


Environment and Prerequisite

  • Git


Issue

  • There was an issue when make git commit with gpg key
error: gpg failed to sign the data
fatal: failed to write commit object


Solution

  • By searching on web, found that using below command makes to appear password input box and issue solved
  • It seems like there are no ways to input password when sign with gpg key which needs password
    • That gpg key is set with password in intial setting
export GPG_TTY=$(tty)


Reference