Skip to content

[MGPG-136] "gpg: signing failed: Bad passphrase" on GitHub Windows runners #172

Closed
@jira-importer

Description

@jira-importer

Gili opened MGPG-136 and commented

Version 3.2.0 - 3.2.6 fail with "gpg: signing failed: Bad passphrase" on GitHub Windows Runners.

Using Linux or downgrading to version 3.1.0 seems to work fine.

It's not clear what changed in these newer versions but

(String) session.getRepositorySession().getConfigProperties().get("env." + passphraseEnvName);
looks like a highly supicious way of reading environment variables. It's possible that this approach does not work properly under Powershell.

If I echo "$env:MAVEN_GPG_PASSPHRASE" on the GitHub Windows runner, I get back the correct value, so it sounds like there is a bug in the way that this plugin is choosing to read the environment variable.

What makes this a bit tricky, however, is that the environment variable is called $MAVEN_GPG_PASSPHRASE on Linux, %MAVEN_GPG_PASSPHRASE% on cmd.exe and $env:MAVEN_GPG_PASSPHRASE on Powershell. GitHub is using the Powershell variant.

Can you guys please look into this?


Affects: 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.2.6

Issue Links:

  • MGPG-145 (IT suite) IT did not catch issue on Windows OS

  • MGPG-99 Passcode byte array provided to gpg executable on stdin is not terminated

Remote Links:

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpriority:criticalCrashes, loss of data, severe memory leak

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions