New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Failed to remove private key #200
Comments
Hello @bbranan. Sorry for the long reply. Does it still reproduce for you ? |
Hey @dmitry-shibanov, thanks for following up. I was able to resolve the issue by creating and using a new key. It's still not clear what about the old key kept it from being removed in the action, given that it worked for the code signing step. I would still recommend updating the |
I also suffer from this problem because my project's GitHub repo has been provisioned with a Here is some example data showing the issue using a private key I created according to the Debian Subkeys article. ~ gpg --batch --import-options import-show --import subkey.key
sec# ed25519 2021-09-13 [SC]
098A3F32AD9899B69806F5B88D6DB9DBDC161CF2
uid BJ Hargrave (Signing Subkey) <bj@hargrave.dev>
ssb cv25519 2021-09-13 [E]
ssb ed25519 2021-09-13 [S]
gpg: To migrate 'secring.gpg', with each smartcard, run: gpg --card-status
gpg: key 8D6DB9DBDC161CF2: secret key imported
gpg: Total number processed: 1
gpg: imported: 1
gpg: secret keys read: 1
gpg: secret keys unchanged: 1 The imported key has the fingerprint Notice the So when cleanup for the ~ gpg --batch --yes --delete-secret-keys 098A3F32AD9899B69806F5B88D6DB9DBDC161CF2
gpg: key "098A3F32AD9899B69806F5B88D6DB9DBDC161CF2" not found
gpg: 098A3F32AD9899B69806F5B88D6DB9DBDC161CF2: delete key failed: Not found Note that ~ gpg --batch --yes --delete-keys 098A3F32AD9899B69806F5B88D6DB9DBDC161CF2
~ gpg --list-keys
~ gpg --list-secret-keys So the cleanup for the action needs to properly handle deleting a cc: @mbarbero |
Further reading led me to the option ~ gpg --batch --yes --delete-secret-and-public-key 098A3F32AD9899B69806F5B88D6DB9DBDC161CF2 |
Good catch @bjhargrave! I can confirm that the key I was using initially (that failed) was a subkey. The new key I created (that works) is a primary key. Your explanation makes sense of the failure I was seeing and the reason why the new key would work. |
Having the same issue here: https://github.com/JarvisCraft/padla/runs/3640842927?check_suite_focus=true While using the following configuration: https://github.com/JarvisCraft/padla/blob/development/.github/workflows/deploy-snapshot.yml The suggested PR (#226) seems to be the fix for it. |
Hello @bbranan @bjhargrave. Thank you for contributions. We appreciate it. |
I can confirm that this fix works: Now just waiting for the fix to be released under a tag! |
I can confirm that it works for me also. https://github.com/eclipse/transformer/actions/runs/1263929181 |
I'm no longer in a good position to test this as my environment has changed since submitting this ticket, but given the success reported by @bjhargrave and @JarvisCraft I can only conclude that this issue has been resolved by the combination of #220 and #226. |
Hello everyone. Thank you for all your responses ! We appreciate it. We released new version of the action. |
@dmitry-shibanov I'm still getting this error in salesforce/formula-engine, but I just started using it. Is there a way to get a better error message than this.
|
Hello @steventamm. Actually we add error message to the |
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:
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:
Runner type:
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.
The text was updated successfully, but these errors were encountered: