IntelliJ fails to commit changes when attempting to sign commit (GPG)

I have been working on setting up my development environment, so when I create a commit it is automatically signed by GPG. I followed Githubs documentation on the matter here:

I am attempting to use IntelliJ’s git interface to create a commit, but it always fails with this error.

  • Does a keypair need to be changed after 'git add' without 'git commit' to remote
  • Jenkins “Git plugin” neither ignores commits with certain messages nor commits with from certain users
  • Recreate My Git Repo From this Commit Json file
  • Git - Accidentally pushed to upstream instead of my branch
  • How can I specify custom global gitconfig path?
  • How does Capistrano work by default?
  • gpg: cannot open `/dev/tty`: Device not configured
    error: gpg failed to sign the data
    fatal: failed to write commit object

    I do not encounter this error when using git directly from my terminal, I discovered an issue where someone had a similar problem (with Source Tree) and mentioned something about the GUI not popping up to enter passphrase. I’m assuming this is similar to that issue.

    How can I go about fixing this issue?

  • Visual Studio using TFS GIT error when connecting
  • How git “hides” files between branches?
  • Merging feature branches without branching all the way back from common ancestor?
  • github search limit results
  • Jenkins: Gerrit & Git plugin - missing refspec field?
  • Remove remote branches in Git
  • 3 Solutions collect form web for “IntelliJ fails to commit changes when attempting to sign commit (GPG)”

    Configure GPG to allow it to be called from a program remotely by adding the following to your gpg.conf:


    I discovered the cause of this yesterday, and figured I’d post an answer for anyone else who might look at this. It was caused because when it tried to sign the commit, it wanted to open a window asking for my passphrase.

    This was the tutorial I followed (specifically the bottom part so it wouldn’t ask me in the future for the passphrase).

    You need to add the following options in your gpg.conf



    Git Baby is a git and github fan, let's start git clone.