Skip to content

GPG fails to sign because settings.xml isn't written #120

Closed

Description

@tcurdt

Description:

I am trying push a release to Maven Central but I am getting

gpg: signing failed: Bad passphrase

Looking at the file system it seems like the settings.xml is not getting written.

Task version:
Specify the task version

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Repro steps:

https://github.com/tcurdt/jdependency/blob/master/.github/workflows/release-ossrh.yml

Expected behavior:

It would be nice to have some log output that the settings.xml gets written - and where it actually gets written to.
That would also confirm it actually gets written.

Actual behavior:

It looks like the settings.xml is missing - which is why the signing fails.

Activity

  1. dmitry-shibanov commented on Feb 10, 2021

    @dmitry-shibanov
    Contributor

    Hello @tcurdt. The default path for settings.xml is ~/.m2. If I understood well, you want to add settings.xml in the root of your project. Could you please try to specify path with settings-path: ${{ github.workspace }} ?
    As I saw in the logs task writes location of settings.xml: overwriting existing file /home/runner/.m2/settings.xml

  2. tcurdt commented on Feb 10, 2021

    @tcurdt
    Author

    I totally missed the overwriting existing file /home/runner/.m2/settings.xml. Thanks for the pointer.

    The docs say it is getting created in $HOME. I guess that should be $HOME/.m2 and tripped me up. But given that it then is the correct location it might not be the reason that it is failing.

    I assume importing private key just means the key got written into the settings file? No indication if the passphrase is correct or not?

  3. tcurdt commented on Feb 10, 2021

    @tcurdt
    Author

    I managed to get it working in the end. Would be nice to have some better logging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions