git 验证可信标签
我想将 git tag -v 命令包含到部署过程中,以捕获未签名的标签或由不受信任的 GPG 密钥签名的标签。
如果标签具有有效签名,则该命令将返回退出代码 0
,但不关心签名密钥是否可信。
我不想手动 grep 结果 GPG 消息
I would like to include git tag -v
command into the deployment process to catch unsigned tags or tags signed by a non-trusted GPG key.
The command returns with an exit code of 0
if the tag has a valid signature, but does not care wether the signed key is trusted or not.
I don't want to resort to grepping the resulting GPG message manually
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我还没有尝试过,文档没有提到退出代码,但你可以尝试
git-verify-tag 管道命令
更新 由于没有简单的方法来测试它,我回顾了源代码:
https://github.com/git/git/blob/81b50f3ce40bfdd66e5d967bf82be001039a9a98/builtin/verify-tag.c
它似乎有意识地返回相关的结果代码,所以我期望这个去工作
I haven't tried it yet, and the documentation doesn't mention exit codes, but you could try
git-verify-tag plumbing command
Update Having no easy way to test this, I've reviewed the source code:
https://github.com/git/git/blob/81b50f3ce40bfdd66e5d967bf82be001039a9a98/builtin/verify-tag.c
It does appear to consciously return the relevant result codes, so I'd expect this to work