How to sign-off (quot;signed-off-byquot;) a Git commit in PyCharm?(如何在 PyCharm 中签署(“签署人)Git 提交?)
问题描述
我想知道如何在 PyCharm 的提交对话框中自动在 Git 提交中添加签名者"行.
I wonder how I can add the "signed-off-by" line in a Git commit automatically within PyCharm's Commit dialog.
有修改上一次提交和更改提交作者的选项,但我找不到在每次提交.
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?
推荐答案
对于任何在谷歌搜索中得到这个答案的人,这里是在 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 提交?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何在 PyCharm 中签署(“签署人")Git 提交?


基础教程推荐
- Python kivy 入口点 inflateRest2 无法定位 libpng16-16.dll 2022-01-01
- 何时使用 os.name、sys.platform 或 platform.system? 2022-01-01
- 如何让 python 脚本监听来自另一个脚本的输入 2022-01-01
- Dask.array.套用_沿_轴:由于额外的元素([1]),使用dask.array的每一行作为另一个函数的输入失败 2022-01-01
- 筛选NumPy数组 2022-01-01
- 使用PyInstaller后在Windows中打开可执行文件时出错 2022-01-01
- 线程时出现 msgbox 错误,GUI 块 2022-01-01
- 用于分类数据的跳跃记号标签 2022-01-01
- 如何在海运重新绘制中自定义标题和y标签 2022-01-01
- 在 Python 中,如果我在一个“with"中返回.块,文件还会关闭吗? 2022-01-01