Skip to content

Error: Failed to remove private key #200

@bbranan

Description

@bbranan

Description:

When attempting to deploy to a maven repository following the configuration documentation [1] the deploy action is successful but the action fails consistently on the "Post" step with output:

Post job cleanup.
Removing private key from keychain
Error: Failed to remove private key

The setup-java code where the attempt to remove the key occurs here: https://github.com/actions/setup-java/blob/v2.0.0/src/cleanup-java.ts. Note that the error is swallowed, making it harder to know why the failure is occurring.

[1] https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-Apache-Maven

Task version:

actions/setup-java@v2

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Repro steps:
A description with steps to reproduce the issue. If your have a public example or repo to share, please provide the link.

Github actions workflow: https://github.com/duracloud/duracloud-db/blob/4afd1ac05398ff95c6c3ee88734b0bfa2ad2614f/.github/workflows/deploy-snapshot.yml
An example of a failed run: https://github.com/duracloud/duracloud-db/runs/3205773250

Expected behavior:
A description of what you expected to happen.

The GPG key would be removed and the job would complete successfully.

Actual behavior:
A description of what is actually happening.

An error is printed and the step and job are failed.

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