By default, IntelliJ won't support the equivalent of git commit -S ...
because that command expects a terminal to input the GPG passphrase.
Create a script that will perform the GPG signing on commits without a terminal:
gpg-no-tty.sh
#!/bin/bash
gpg --batch --no-tty "$@"
Reference that script in your gitconfig:
[commit]
gpgsign = true
[gpg]
program = /path/to/script/gpg-no-tty.sh
And that's it. Enjoy!