aleksandr-m / gitflow-maven-plugin

The Git-Flow Maven Plugin supports various Git workflows, including GitFlow and GitHub Flow. This plugin runs Git and Maven commands from the command line.
https://aleksandr-m.github.io/gitflow-maven-plugin/
Apache License 2.0
488 stars 180 forks source link

error: gpg failed to sign the data #309

Closed vicboma1 closed 2 years ago

vicboma1 commented 2 years ago

Hi, when I just merge a feature with the develop branch, I get an error at the end of the pipeline

[ERROR] Failed to execute goal com.amashchenko.maven.plugin: gitflow-maven-plugin: 1.16.0: feature-finish (default-cli) on project project-xxxxxx: feature-finish: error: gpg failed to sign the data

Apparently a satisfactory signature comes out:

[INFO] Committing changes. GPG-signed.

The execution line is:

if I try to launch the plugin with -DgpgSignCommit = false, I get the above error:

'[ERROR] Failed to execute goal com.amashchenko.maven.plugin: gitflow-maven-plugin: 1.16.0: feature-finish (default-cli) on project xxxxxx: feature-finish: error: gpg failed to sign the data '' '

Trace:

[INFO] Local aggregation root: / home / gitlab-runner / builds / CN6tLW4W / 0 / xxxxxx / [INFO] Processing change of xxxxxx: 2.0.0.0-test-pipe-SNAPSHOT -> 2.0.0.1-test-pipe-SNAPSHOT [INFO] Processing xxxxxx [INFO] Updating project xxxxxx [INFO] from version 2.0.0.0-test-pipe-SNAPSHOT to 2.0.0.1-test-pipe-SNAPSHOT [INFO] [INFO] ----------------------------------------------- ------------------------- [INFO] BUILD SUCCESS [INFO] ----------------------------------------------- ------------------------- [INFO] Total time: 4.889 s [INFO] Finished at: 2021-08-19T14: 49: 06 + 02: 00 [INFO] ----------------------------------------------- ------------------------- [INFO] Committing changes. GPG-signed. [INFO] ----------------------------------------------- ------------------------- [INFO] BUILD FAILURE [INFO] ----------------------------------------------- ------------------------- [INFO] Total time: 06:51 min [INFO] Finished at: 2021-08-19T14: 49: 06 + 02: 00 [INFO] ----------------------------------------------- ------------------------- [ERROR] Failed to execute goal com.amashchenko.maven.plugin: gitflow-maven-plugin: 1.16.0: feature-finish (default-cli) on project sina-suite.sina-front: feature-finish: error: gpg failed to sign the data [ERROR] fatal: failed to write commit object

With this execution:

The execution line is:

Thanks!

aleksandr-m commented 2 years ago

You have some weird arguments in your command -Dgpg trueSignCommit=true. What do you want to achieve?

vicboma1 commented 2 years ago

I found the problem. The gitlab-ci environment was 'stuck' and on restarting it everything worked fine. Thanks for the feedback!