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

Can't launch sbt because of ".sbt/0.13/plugins/gpg.sbt:3: error: not found: value pgpSecretRing" error #69

Closed
azakordonets opened this issue Dec 30, 2014 · 7 comments
Labels

Comments

@azakordonets
Copy link

I have pgpSecretRing and phpPubRing already generated by PGP UI tool. I have created ~/.sbt/0.13/plugins/pgp.sbt file and have put there next content :

addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")

pgpSecretRing := file("/Users/biercoff/.gnupg/secring.gpg")

pgpPublicRing := file("/Users/biercoff/.gnupg/pubring.gpg")

When i try to run sbt in my project, i get next error :

➜  fabricator git:(master) sbt
/Users/biercoff/.sbt/0.13/plugins/gpg.sbt:3: error: not found: value pgpSecretRing
pgpSecretRing := file("/Users/biercoff/.gnupg/secring.gpg")
^
[error] Type error in expression
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?

What am i missing ?

@utgarda
Copy link

utgarda commented Jan 27, 2015

As far as I understood the docs, those settings should go to ~/.sbt/gpg.sbt, not the file where you add the plugin. Doesn't seem to work for me, though.

@jsuereth
Copy link
Member

you need to split your settings:

~/.sbt/0.13/plugins/pgp.sbt - This configures the inclusion of the plugin

addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")

~/.sbt/0.13/pgp.sbt - This configures default settings for builds.

pgpSecretRing := file("/Users/biercoff/.gnupg/secring.gpg")
pgpPublicRing := file("/Users/biercoff/.gnupg/pubring.gpg")

Hope that helps!

@mrmechko
Copy link

mrmechko commented Jun 8, 2015

In a similar vein, my ~/.sbt/0.13/pgp.sbt file is essentially identical to the one above, but I'm still getting the same error. Is this because addSbtPlugin(...) is in a project specific file? I suppose the question is are the global .sbt files loaded before the project specific ones?

@tel
Copy link

tel commented Jun 14, 2016

@mrmechko Just discovered this myself today: you need to fully qualify your keys in pgp.sbt, e.g.

com.typesafe.sbt.pgp.PgpKeys.pgpSecretRing := file("/Users/tel/.gnupgp/secring.asc")
com.typesafe.sbt.pgp.PgpKeys.pgpPublicRing := file("/Users/tel/.gnupgp/pubring.asc")

laugimethods pushed a commit to Logimethods/nats-connector-gatling that referenced this issue Jun 17, 2016
@dwickern
Copy link

For the changes to stick, I also had to specify in Global:

// ~/.sbt/0.13/pgp.sbt
com.typesafe.sbt.pgp.PgpKeys.pgpSecretRing in Global := file(".../secring.asc")
com.typesafe.sbt.pgp.PgpKeys.pgpPublicRing in Global := file(".../pubring.asc")

To verify, you can run show */*:pgpSecretRing

@BenWhitehead
Copy link

If you want to use usePgpKeyHex for a specific key add (when using sbt-pgp 1.0.0)

com.typesafe.sbt.SbtPgp.autoImportImpl.usePgpKeyHex("<hexid>")

@johnynek
Copy link

with 1.0.0 I had to use

com.typesafe.sbt.SbtPgp.autoImportImpl.pgpSecretRing := to get things to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants