问题描述
我想知道如何在PyCharm的提交"对话框中自动在Git提交中添加签署人"行.
I wonder how I can add the "signed-off-by" line in a Git commit automatically within PyCharm's Commit dialog.
有一些选项可以修改上一个提交并更改提交的作者,但是我找不到在每个提交的基础上添加已签名行(git commit -s
)的选项.
There are options for amending to the previous commit and changing the author of the commit, but I couldn't find an option for adding the signed-off line (git commit -s
) on a per-commit basis.
它甚至可能还是缺少的功能?
Is it even possible or is it a missing feature?
推荐答案
对于在google搜索中获得此答案的任何人,以下是在Ubuntu 16.04中测试过的解决方案:
For anyone getting this answer in google searches, here is the solution as tested in Ubuntu 16.04:
echo 'no-tty' >> ~/.gnupg/gpg.conf
echo 'use-agent' >> ~/.gnupg/gpg.conf
那么您可以:
git config --global format.signoff true
这会将git设置为始终注销,并设置gpg使用gtk弹出窗口在需要时询问您的密钥密码,并避免pycharm中的错误.
This will set git to always sign-off, and set gpg to use a gtk popup to ask for your key password when needed and avoid errors in pycharm.
希望能帮助到某人.
这篇关于如何在PyCharm中签署(“签署者"签署)Git提交?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!