如何禁用 git gpg 签名
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/39274739/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to disable git gpg signing
提问by Thellimist
I'm using git gpg signing. I want to disable it. I've set .gitconfig
我正在使用 git gpg 签名。我想禁用它。我已经设置了.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.
PS:我也禁用了 SourcetreeRepository/ Repository Settings/Security
选项卡。Sourcetree 和终端都强制使用 gpg。
回答by Edward Loveall
You can disable this by running git config commit.gpgsign false
This sets the configuration locally instead of globally.
您可以通过运行git config commit.gpgsign false
This 本地而不是全局设置配置来禁用它。
Putting this setting in .gitconfig worked for me with what you had, without the [user] configuration:
将这个设置放在 .gitconfig 中对我有用,没有 [user] 配置:
[commit]
gpgsign = false
回答by friederbluemle
To temporarily disable GPG signing for the next commit:
为下一次提交暂时禁用 GPG 签名:
git -c commit.gpgsign=false commit
回答by Gayan Weerakutti
To unsign the last commit:
要取消对最后一次提交的签名:
git commit --amend --no-gpg-sign
Countermand commit.gpgSign
configuration variable that is set to force each and every commit to be signed.
Countermandcommit.gpgSign
配置变量设置为强制对每个提交进行签名。