Search code examples
mavenreleasegnupg

'gpg.exe' is not recognized as an internal or external command, operable program or batch file - Maven Release Plugin


I just got my free Sonatype Maven repo and have been attempting to do a release. However whilst trying to do this I get an error when maven-gpg-plugin attempts to sign artifacts.

I get a ton of asterisks showing beforehand and I just press enter and then I get this issue, here's my full log: http://pastebin.com/GkLbFgBF

Here are the command line parameters I am attempting to use clean install javadoc:javadoc javadoc:jar source:jar release:clean release:prepare release:perform

I installed gpg4win thinking that might solve this but it hasn't.


Solution

  • As each system is differently configured the following steps works in some cases.

    when you receive this error message, “gpg is not recognized as an internal or external command” then you need to update your PATH variable.

    To do this without reboot:

    1. Open up a command prompt window
    2. Paste this in:

      SET PATH=%PATH%;C:\Program Files (x86)\GNU\GnuPG
      
    3. Hit Enter