Google-cloud-java: mvn install fails with "secret key not available" ?

Created on 19 Mar 2015  路  3Comments  路  Source: googleapis/google-cloud-java

What I did:

$ sudo apt-get install mvn2
$ git clone https://github.com/GoogleCloudPlatform/gcloud-java.git
$ cd gcloud-java
$ mvn install

Error I got:

[INFO] Building jar: /usr/local/google/home/jjg/gcdjavasample/gcloud-java/target/gcloud-java-0.0.3-javadoc.jar
[INFO] [failsafe:integration-test {execution: default}]
[INFO] [failsafe:verify {execution: default}]
[INFO] Failsafe report directory: /usr/local/google/home/jjg/gcdjavasample/gcloud-java/target/failsafe-reports
[INFO] [gpg:sign {execution: sign-artifacts}]
gpg: no default secret key: secret key not available
gpg: signing failed: secret key not available
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Exit code: 2
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Exit code: 2
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
    at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
    at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
    at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Exit code: 2
    at org.apache.maven.plugin.gpg.GpgSigner.generateSignatureForFile(GpgSigner.java:168)
    at org.apache.maven.plugin.gpg.AbstractGpgSigner.generateSignatureForArtifact(AbstractGpgSigner.java:205)
    at org.apache.maven.plugin.gpg.GpgSignAttachedMojo.execute(GpgSignAttachedMojo.java:140)
    at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
    ... 17 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 39 seconds
[INFO] Finished at: Thu Mar 19 11:10:53 EDT 2015
[INFO] Final Memory: 75M/1366M
[INFO] ------------------------------------------------------------------------
core triage me bug

Most helpful comment

Above should be -Dgpg.skip=true for those seeing this in a search.

All 3 comments

signing was needed for deploy and I, wrongly, assumed no one should bother
with mvn install (which could have been made to pass with the addition
-Dpgp.skip-true).
I moved the signing to the deploy phase and now install does not try sign
the artifact.

just checked - LGTM :)

Above should be -Dgpg.skip=true for those seeing this in a search.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

goxr3plus picture goxr3plus  路  28Comments

fkorotkov picture fkorotkov  路  26Comments

fondberg picture fondberg  路  26Comments

lbergelson picture lbergelson  路  71Comments

fmatar picture fmatar  路  23Comments