【问题标题】:How to disable git gpg signing如何禁用 git gpg 签名
【发布时间】:2016-09-01 14:50:09
【问题描述】:
我正在使用 git gpg 签名。我想禁用它。我已经设置了.gitconfig
[user]
name = NAME
email = EMAIL
signingkey = KEY
...
[commit]
gpgsign = false
默认情况下,我的提交仍在签名。
PS:我也禁用了 Sourcetree Repository/ Repository Settings/Security 选项卡。 Sourcetree 和终端都强制使用 gpg。
【问题讨论】:
标签:
git
atlassian-sourcetree
sourcetree
【解决方案1】:
您可以通过运行 git config commit.gpgsign false 来禁用此功能,这会在本地而不是全局设置配置。
将此设置放在 .gitconfig 中对我有用,而无需 [user] 配置:
[commit]
gpgsign = false
【解决方案2】:
为下一次提交暂时禁用 GPG 签名:
git -c commit.gpgsign=false commit
【解决方案3】:
为您计算机上的每个存储库禁用 Git GPG 签名
git config --global commit.gpgsign false
为单个存储库禁用 Git GPG 签名
git config commit.gpgsign false
如果您想再次启用 GPG 签名,只需将 false 替换为 true
【解决方案4】:
取消签名最后一次提交:
git commit --amend --no-gpg-sign
-no-gpg-sign
Countermand commit.gpgSign 配置变量,设置为强制对每个提交进行签名。