Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pgpSigningKey can't be found using credentials method #170

Open
margussipria opened this issue Oct 21, 2019 · 0 comments
Open

pgpSigningKey can't be found using credentials method #170

margussipria opened this issue Oct 21, 2019 · 0 comments

Comments

@margussipria
Copy link

steps

sbt-pgp version: 2.0.0
sbt version: 1.3.3

problem

Using credentials how it is show README.md will not work.

When documentation part was copied from jodersky/sbt-gpg, also changes should have been done to that.

In this plugin gpg has been changed to pgp

pgpSigningKey := Credentials.forHost(credentials.value, "pgp").map(_.userName),

But changing this does not help, as this plugin is running that line before credential is added? I can see my key when running:

sbt:macros> show credentials
[info] * DirectCredentials("GnuPG Key ID", "pgp", "2BE67AC00D699E04E840B7FE29967E804D85663F", ****)

But can't see key when I run

sbt:macros> show pgpSigningKey
[info] None

I can use usePgpKeyHex method to add key, or add manually following line

pgpSigningKey := Credentials.forHost(credentials.value, "pgp").map(_.userName)

But that would be same if I would add key directly as

pgpSigningKey := Some("2BE67AC00D699E04E840B7FE29967E804D85663F")

expectation

  1. Documentation to be correct
  2. Signing key to be be loaded from credentials (plugin default value is resolved too early?)

notes

  1. I have tested moving credentials from project scope to global, didn't help with discovery.
  2. It would be nice to be able prefix host gpg for example with organization key. I have 2 keys that I use for signing different projects, those projects that could have multiple maintainers signing, it would be nice to have for work code one public configuration and every member has own private credentials file. For now I can have this option and also fix bug by having this line in public configuration
pgpSigningKey := Credentials.forHost(credentials.value, s"${organization.value}-gpg").map(_.userName)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant