I have preset the passphrase in gpgagent but still it is prompting for password first time. Following are the steps i did.
installed gpg on windows from https://gnupg.org/download/ (version - 2.2.23)
in home dir set the allow-preset-passphrase in gpg-agent.conf.
from powershell started agent
"$gpgPath\bin\gpg-connect-agent.exe" reloadagent /bye
powershell set passphrase
"$gpgPath\bin\gpg-preset-passphrase.exe" -v -c -P "$pgpPassphrase" keyid
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
- I don't see any option in windows, to verify if passphrase has been cached . does any one knows how to do that ?
- 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.