slipset / deps-deploy

deploy your stuff
Eclipse Public License 1.0
148 stars 31 forks source link

GPG passphrase always refused #9

Closed arichiardi closed 5 years ago

arichiardi commented 5 years ago

Hi again!

It seems like there could be a problem with keys/subkeys because every time I insert my gpg passphrase I receive a:

gpg passphrase: 
Exception in thread "main" java.lang.Exception: gpg: signing failed: Bad passphrase
gpg: signing failed: Bad passphrase

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at clojure.lang.Reflector.invokeConstructor(Reflector.java:305)
    at deps_deploy.gpg$sign_BANG_.invokeStatic(gpg.clj:52)
    at deps_deploy.gpg$sign_BANG_.invoke(gpg.clj:45)
    at deps_deploy.deps_deploy$sign_BANG_.invokeStatic(deps_deploy.clj:53)
    at deps_deploy.deps_deploy$sign_BANG_.invoke(deps_deploy.clj:51)
    at deps_deploy.deps_deploy$all_artifacts.invokeStatic(deps_deploy.clj:62)
    at deps_deploy.deps_deploy$all_artifacts.invoke(deps_deploy.clj:60)
    at deps_deploy.deps_deploy$_main.invokeStatic(deps_deploy.clj:87)
    at deps_deploy.deps_deploy$_main.doInvoke(deps_deploy.clj:83)
    at clojure.lang.RestFn.applyTo(RestFn.java:142)
    at clojure.lang.Var.applyTo(Var.java:705)
    at clojure.core$apply.invokeStatic(core.clj:665)
    at clojure.main$main_opt.invokeStatic(main.clj:491)
    at clojure.main$main_opt.invoke(main.clj:487)
    at clojure.main$main.invokeStatic(main.clj:598)
    at clojure.main$main.doInvoke(main.clj:561)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.lang.Var.applyTo(Var.java:705)
    at clojure.main.main(main.java:37)

Is there any additional setting for gpg signing?

Everything else works fine so I exclude a setup problem in my bash variables for gpg.

slipset commented 5 years ago

Unfortunately I have a very limited knowledge of gpg, but: Running

$ gpg --batch --pinentry-mode loopback --passphrase-fd 0 --armour --detach-sign <a file of your choosing>

from the terminal will prompt you (without a prompt) to enter your pgp passphrase (which will be output in cleartext):

$ gpg --batch --pinentry-mode loopback --passphrase-fd 0 --armour --detach-sign project.clj
<passphrase redacted>
$

Worked for me, so I guess the question is if it works for you?

arichiardi commented 5 years ago

It seems like it was a problem on my end actually, so I had two gpg signing keys and apparently I was inputing the wrong password, sorry about that, closing!

slipset commented 5 years ago

Cool, I'm just happy it wasn't my fault :)