How to disable git gpg signing

旧城冷巷雨未停 提交于 2020-11-30 04:49:39

问题


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.


回答1:


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



回答2:


To temporarily disable GPG signing for the next commit:

git -c commit.gpgsign=false commit



回答3:


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.




回答4:


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



来源:https://stackoverflow.com/questions/39274739/how-to-disable-git-gpg-signing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!