Where to keep a GPG secret key for a Maven project in CI environment?(CI环境中Maven项目的GPG密钥在哪里保存?)
问题描述
我正在尝试使用 maven-gpg-plugin:签名 以便在部署到 Sonatype OSS 存储库之前对项目工件进行签名.问题是我应该将我的密钥 secring.gpg 保存在哪里:
I'm trying to use maven-gpg-plugin:sign in order to sign project artifacts before deployment to Sonatype OSS repository. The question is where shall I keep my secret key secring.gpg:
- 在持续集成
~/.gnupg目录 - 在项目源代码中,例如
src/test/resources/gpg/secring.gpg
为什么?
推荐答案
如果密钥敏感,请将其放在 CI 服务器上的 ~/.gnupg 目录中,并使用适当的访问修饰符保护该目录.第二种方法将允许每个有权访问项目的开发人员查看密钥.
If key is sensitive put it in ~/.gnupg directory on CI server and protect that directory with proper access modifiers. 2nd approach will allow every developer with access to project to see key.
这篇关于CI环境中Maven项目的GPG密钥在哪里保存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:CI环境中Maven项目的GPG密钥在哪里保存?
基础教程推荐
- 使用堆栈算法进行括号/括号匹配 2022-01-01
- Spring AOP错误无法懒惰地为此建议构建thisJoinPoin 2022-09-13
- 问题http://apache.org/xml/features/xinclude测试日志4j 2 2022-01-01
- REST Web 服务返回 415 - 不支持的媒体类型 2022-01-01
- 存储 20 位数字的数据类型 2022-01-01
- 如何对 Java Hashmap 中的值求和 2022-01-01
- 无法复制:“比较方法违反了它的一般约定!" 2022-01-01
- RabbitMQ:消息保持“未确认"; 2022-01-01
- Struts2 URL 无法访问 2022-01-01
- 修改 void 函数的输入参数,然后读取 2022-01-01
