Search code examples
gitphpstormsign

PHPStorm use private key to sign commit


How do I sign git commit in PhPStorm?

command-line which works (the option '-S'):

git commit -S -m "My message"

But cannot find a way to achieve it using PHPStorm.


Solution

  • Your best bet is the workaround suggested in the current bug filing IDEA-110261 Support git commit -S (GPG commit sigining).

    1. In your terminal, set the project to to sign: git config commit.gpgsign true
    2. In the config file ~/.gnupg/gpg.conf add:

      no-tty
      use-agent