This repository has been archived by the owner on Apr 22, 2020. It is now read-only.
Import the secret key into gpg before signing artifacts #1253
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add a step to Travis's
before_install
to import the secret key file into gpg after decrypting it.Also remove unnecessary
pgpPublicRing
andpgpSecretRing
settings. They are only used by sbt-pgp's bouncycastle signer implementation, which we don't use anymore.Remove the
pubring.gpg
file, as we don't use it anymore.Remove the recently added
usePgpKeyHex(...)
. It turned out not to be necessary. We only import one key into gpg, so there is no need to specify the key.@BenFradet @juanpedromoreno I'm confident it will work this time! You can see my sad trail of experiments on the signing branch if you're interested.
The moral of the story is, don't trust filenames! The
pubring.gpg
andsecring.gpg
files are not actually gpg keyrings, despite what their filenames suggest. They are an ascii-armored public key and secret key respectively. That set me back a few hours.Migration guide for projects that use sbt-org-policies
0.12.60.13.0 (to be released after this PR is merged)pubring.gpg
file from your repo, as it is no longer neededsecring.gpg
file to something more representative. I called itsecret_key.asc
.travis.yml
to import the secret key into gpg during thebefore_install
phase. See here for an example. Don't forget the semicolon at the end of the line.pgpPublicRing
and/orpgpSecretRing
in yourbuild.sbt
, you can delete those settings.