Where to keep a GPG secret key for a Maven project in CI environment?

本小妞迷上赌 提交于 2019-12-01 16:14:15

问题


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. In continuous integration ~/.gnupg directory
  2. In project source code, e.g. src/test/resources/gpg/secring.gpg

And why?


回答1:


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.



来源:https://stackoverflow.com/questions/4511954/where-to-keep-a-gpg-secret-key-for-a-maven-project-in-ci-environment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!