CI环境中Maven项目的GPG密钥在哪里保存? [英] Where to keep a GPG secret key for a Maven project in CI environment?

查看:38
本文介绍了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:

  1. 在持续集成~/.gnupg目录
  2. 在项目源代码中,例如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密钥在哪里保存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆