-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Set passphrase only for the fingerprint being used #123
Set passphrase only for the fingerprint being used #123
Conversation
@josecelano Thanks for this! A test seems to fail: https://github.com/crazy-max/ghaction-import-gpg/runs/5336379690?check_suite_focus=true#step:4:337 |
It was only a temp test to give an example. I've used a key from my keyring. I was afraid that the tests could change things in my personal keyrgrip because I do not see where you overwrite the GPG homedir for the tests. I thought a maintainer could move the test for the new function to the |
By the way @crazy-max I'm using part of this repo's code here. I've included a link on the README t this repo. Although we might remove the signing feature from that action in the future. |
9b818f9
to
1d829a0
Compare
@crazy-max I've changed the code to use the test GPG keys already used by the tests. |
Codecov Report
@@ Coverage Diff @@
## master #123 +/- ##
==========================================
+ Coverage 81.30% 81.96% +0.65%
==========================================
Files 3 3
Lines 107 122 +15
Branches 23 25 +2
==========================================
+ Hits 87 100 +13
Misses 11 11
- Partials 9 11 +2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks! I wonder if you could add an example using a subkey and a specific fingerprint in usage section of the README https://github.com/crazy-max/ghaction-import-gpg#usage?
Oh and also add a new job in https://github.com/crazy-max/ghaction-import-gpg/blob/master/.github/workflows/ci.yml to test that behavior as e2e test if you want but not required. EDIT: Actually I think that's fine with UT. Forget what I said. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome thanks!
`artichoke/ghaction-import-gpg` is synced from upstream which includes several new releases, including a breaking change to v5 which upgrades the nodejs runtime version. The tag in `artichoke/ghaction-import-gpg` is: - https://github.com/artichoke/ghaction-import-gpg/tree/v5.1.0 Diff of the upgrade from v4.1.0 to v5.1.0 is: - https://github.com/artichoke/ghaction-import-gpg/compare/v4.1.0..v5.1.0. The diff is mostly tests and linting, with some changes to how key fingerprints and subkeys are handled, most notably: - crazy-max/ghaction-import-gpg#123 - crazy-max/ghaction-import-gpg#125 - crazy-max/ghaction-import-gpg#129 `artichoke/nightly` uses a signing subkey, so these fixes are good to take.
Relates to: #119 (comment)
I had problems using a signing subkey.
How to reproduce:
That is the process to upload a signing subkey to GitHub with a different passphrase.
Using that key this action tries to preset the passphrase for all the subkeys, including the primary key. Since the primary key is not functional I got an error. I have changed the code to only preset the key for the subkey if you specify the input
fingerprint
.I've tested the change in this repo: https://github.com/Nautilus-Cyberneering/chinese-ideographs-website/runs/5336330660?check_suite_focus=true#step:4:40