2

I have preset the passphrase in gpgagent but still it is prompting for password first time. Following are the steps i did.

  1. installed gpg on windows from https://gnupg.org/download/ (version - 2.2.23)

  2. in home dir set the allow-preset-passphrase in gpg-agent.conf.

  3. from powershell started agent

    "$gpgPath\bin\gpg-connect-agent.exe" reloadagent /bye

  4. powershell set passphrase

    "$gpgPath\bin\gpg-preset-passphrase.exe" -v -c -P "$pgpPassphrase" keyid

  5. mvn sign and deploy

mvn gpg:sign-and-deploy-file -B
"-Dfile=E:\Publish\files-1.0.12-test.jar"
"-Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2"
"-Drevision=1.0.12-test" "-DrepositoryId=ossrh"
"-Dversion=1.0.12-test" "-DgroupId=datamodel" "-DartifactId=files"
"-Dsources=E:\Publish\files-1.0.12-test-sources.jar"
"-Djavadoc=E:\Publish\files-1.0.12-test-javadoc.jar"
"-Dpackaging=jar" "-DpomFile=E:\Publish\pom.xml"

it prompted the passphrase, I already cached it at step 4.

questions

  1. I don't see any option in windows, to verify if passphrase has been cached . does any one knows how to do that ?
  2. is there any steps I am missing causing passphrase prompt?

i tried following way as well but ,it keep on prompting me for passphrase for first time . Avoid gpg signing prompt when using Maven release plugin

I am kind of stuck here. Any help is very much appreciated.

Suri
  • 3,287
  • 9
  • 45
  • 75

0 Answers0