Skip to content
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

Delete key fails when you use set a subkey for the fingerprint input #124

Closed
josecelano opened this issue Feb 25, 2022 · 2 comments · Fixed by #125
Closed

Delete key fails when you use set a subkey for the fingerprint input #124

josecelano opened this issue Feb 25, 2022 · 2 comments · Fixed by #125

Comments

@josecelano
Copy link
Contributor

Behaviour

If you use the input fingerprint with the fingerprint of the subkey, the Post import GPG key step tried to delete the key using the fingerprint of the subkey. I suppose you have to use the KeyID (fingerprint of the primary key).

Steps to reproduce this issue

They were described in this PR.

Expected behaviour

I should delete the key.

Actual behaviour

It does not delete the key and it was correctly imported into the keyring.

Configuration

Logs

image

@josecelano
Copy link
Contributor Author

I'm getting this error now:

image

It seems we have to remove the --batch option here.

Lint to the error: https://github.com/Nautilus-Cyberneering/nautilus-librarian/runs/5394342708?check_suite_focus=true#step:25:3

.getExecOutput('gpg', ['--batch', '--yes', '--delete-secret-keys', fingerprint], {

The test did not catch this case because it's using the fingerprint. We can reopen the issue, add a new test for that case and fix it.

describe('deleteKey', () => {

@t3chguy
Copy link

t3chguy commented Feb 13, 2023

I am experiencing this in v5 of the action when passing & loading only a signing subkey. It tries to delete using the fingerprint of the pubkey which is discovered via the subkey.

t3chguy@Michael-t3chguy-MBP ~> gpg --list-keys --with-subkey-fingerprints D7B0B66941D01538
pub   rsa4096 2019-04-15 [SC] [expires: 2024-04-13]
      12D4CD600C2240A9F4A82071D7B0B66941D01538
uid           [ unknown] riot.im packages <packages@riot.im>
sub   rsa3072 2019-04-15 [S] [expires: 2023-04-15]
      75741890063E5E9A46135D01C2850B265AC085BD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants