预先提交不允许进行GPG代码签名?

时间:2019-03-11 17:23:42

标签: git gnupg pre-commit-hook pre-commit

出于安全考虑,我们使用GPG2签署了每次提交。通常,这涉及到一个完整的终端窗口“弹出窗口”,要求您在运行git commit之后输入密码(终端屏幕仅由GPG消息代替)。但是,我们已经在提交之前开始使用python的pre-commit工具运行linting了,并且没有出现“弹出窗口”。这是我得到的错误:

$ git commit -m "fix linting issues"
autopep8 wrapper.........................................................Passed
Flake8...................................................................Passed
Check python ast.........................................................Passed
Check for added large files..............................................Passed
Check JSON...............................................................Passed
Check for merge conflicts................................................Passed
Check for case conflicts.................................................Passed
Check Yaml...............................................................Passed
Debug Statements (Python)................................................Passed
Detect Private Key.......................................................Passed
Fix double quoted strings................................................Passed
Fix End of Files.........................................................Passed
Forbid new submodules....................................................Passed
Trim Trailing Whitespace.................................................Passed
Pretty format JSON.......................................................Passed
pylint...................................................................Passed

error: gpg failed to sign the data
fatal: failed to write commit object

0 个答案:

没有答案