105

I'm using git gpg signing. I want to disable it. I've set .gitconfig

[user]
    name = NAME
    email = EMAIL
    signingkey = KEY
...
[commit]
    gpgsign = false

My commits are still signing by default.

PS: I also disabled from Sourcetree Repository/ Repository Settings/Security tab. Both Sourcetree and terminal forces to use gpg.

Thellimist
  • 3,757
  • 5
  • 31
  • 49

4 Answers4

108

You can disable this by running git config commit.gpgsign false This sets the configuration locally instead of globally.

Putting this setting in .gitconfig worked for me with what you had, without the [user] configuration:

[commit]
    gpgsign = false
Edward Loveall
  • 1,983
  • 1
  • 19
  • 34
93

To temporarily disable GPG signing for the next commit:

git -c commit.gpgsign=false commit
friederbluemle
  • 33,549
  • 14
  • 108
  • 109
80

To disable Git GPG signing for every repository on your computer

git config --global commit.gpgsign false

To disable Git GPG signing for a single repository

git config commit.gpgsign false

If you want to enable GPG signing again just replace false with true

Jamith NImantha
  • 1,999
  • 2
  • 20
  • 27
60

To unsign the last commit:

git commit --amend --no-gpg-sign

-no-gpg-sign

Countermand commit.gpgSign configuration variable that is set to force each and every commit to be signed.

Gayan Weerakutti
  • 11,904
  • 2
  • 71
  • 68