How to disable git gpg signing

GitAtlassian SourcetreeSourcetree

Git Problem Overview


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.

Git Solutions


Solution 1 - Git

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

Solution 2 - Git

To temporarily disable GPG signing for the next commit:

git -c commit.gpgsign=false commit

Solution 3 - Git

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

Solution 4 - Git

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.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionThellimistView Question on Stackoverflow
Solution 1 - GitEdward LoveallView Answer on Stackoverflow
Solution 2 - GitfriederbluemleView Answer on Stackoverflow
Solution 3 - GitJamith NImanthaView Answer on Stackoverflow
Solution 4 - GitGayan WeerakuttiView Answer on Stackoverflow