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

Doesn't read a passphrase from keyboard #70

Closed
vkostyukov opened this issue Jan 19, 2015 · 4 comments
Closed

Doesn't read a passphrase from keyboard #70

vkostyukov opened this issue Jan 19, 2015 · 4 comments

Comments

@vkostyukov
Copy link

I use version :

addSbtPlugin("com.typesafe.sbt" % "sbt-pgp" % "0.8.3")

and

vkostyukov@corvus:finch$ gpg --version
gpg (GnuPG) 1.4.18

When I do publishSigned plugin asks me for passphrase and then prints:

Enter passphrase: [error] gpg: Invalid passphrase; please try again ...

I'm pretty sure I know my passphrase (and I regenerated it like 10 times today). It seems that the plugin doesn't read the input from keyboard. I also tried to specify the passphrase in ~/.sbt/gpg.sbt in pgpPassphrase variable but it's still asking me for a passphrase in the console, which is weird.

@vkostyukov
Copy link
Author

And also it doesn't seem to be working w/o gpg installed:

> set pgpReadOnly := false
[info] Defining */*:pgpReadOnly
[info] The new value will be used by no settings or tasks.
[info] Reapplying settings...
[info] Set current project to root (in build file:/Users/vkostyukov/workspace/finch/)
> pgp-cmd gen-key
Failed to run pgp-cmd: GeneratePgpKey().   Please report this issue at http://github.com/sbt/sbt-pgp/issues
> 

@vkostyukov
Copy link
Author

I tried everything form the begging:

  1. Remove gpg "brew uninstall gpg"
  2. Remove ~/.gnupg
  3. Remove ~/.sbt/gpg
  4. Use plugin addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
  5. Use sbt: sbt.version=0.13.7

In sbt console:

  1. set pgpReadOnly := false
  2. gpg-cmd gen-key
  3. gpg-cmd send-key ...
  4. set pgpPassphrase := Some(Array('f','o','o'))
  5. +publish-signed

I'm getting the following:

[error] (root/*:signedArtifacts) java.io.IOException: Cannot run program "gpg": error=2, No such file or directory

If I install gpg (brew install):

[error] (root/*:signedArtifacts) Failure running gpg --detach-sign.  Exit code: 2

@jsuereth
Copy link
Member

It looks like you must have somewhere which is trying for the gpg command line.

Can you type: show useGpg and see if the value is true? I'm guessing you have a .sbt file somewhere which has this set to true.

@vkostyukov
Copy link
Author

That's right. Thanks. It works!

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

2 participants