Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 561
yegor256 Avatar asked Dec 22 '10 17:12

yegor256


1 Answers

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.

like image 177
Victor Sorokin Avatar answered Oct 19 '22 22:10

Victor Sorokin