-
-
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
Sign releases with PGP key #131
Comments
Thanks for the suggestions and detailed explanation. But I haven't seen many repos publishing packages with pgp. Are there any downsides? Will non pgp/git users be able to download xplr without having to setup key or installing git? |
No downsides, except some extra work for you to set this up 😁 Verifying signature is completely optional for users, just like it's optional to verify sha* hashsum file that you are attaching to the releases now. You can think of it like this, hashsums help to ensure integrity (file wasn't corrupted during download), signatures help ensure authenticity (there was no MITM attacker who made me download evil file with evil hashsum - they can forge hashsum, but not the signature) while also indirectly help ensure integrity (signature will not match a corrupted file). But you can also just download the file and hope that it wasn't corrupted or modified along the way 😄
Aah hmm 🤔 Yeah depending on your preference, I can see two alternatives:
nnn went the former way, so this means you'd push a git tag to trigger Github actions to start the release, and then you'd run But I know some projects who went the latter way. It's a bit less nice because now Github has access to your private key, but I guess with proper care the risk is limited and this is better than nothing 🙂 Let me know what you think. I can help with whatever way you choose to go. It's also okay if you don't want to deal with any of this 🙂 orhun and I now maintain xplr package in Arch community repo (I see he already shared the news 🙂), so rest assured if you choose to generate the signatures, it will be put to good use for the Arch package! 🙂 |
Sounds fun 👍 . I'll try this in the coming weekend. |
@maximbaz does this work with the master branch? I had to tar gzip the signature because of github upload limitations. http://keys.gnupg.net/pks/lookup?op=get&search=0x0F8EF5258DC38077 |
Can you show me what kind of limitation you have? I use it in other projects, should work fine. I'm afraid archived signature might not play well with packaging automation.... Try also If you are testing by hand, generate please a signature for the latest release, I'll be verifying by:
|
I meant limitation of uploading the sig in this comment. This is only to verify with you if this works (i.e. you're able to verify the signature). Then I'll start setting up GH actions. |
interestingly it seems like the signature was made using a different key ID 🤔
|
Ah ok... so that's how it works. It's actually my previous signature. Try verifying xplr.tar.gz |
Good to know GitHub automatically signs the releases. |
You might have accidentally attached an archive, and not a new signature :) Signature file contains which key was used to sign an archive. Or if you want to use a different key, just make sure to publish it to keys.gnupg.net When you sign, you can specify which key to use, using |
Maybe just to give you another reference, an example how I do it in another project: https://github.com/maximbaz/yubikey-touch-detector/releases/tag/1.9.1 |
The signature is the same. I'm sure |
Aaah I think we misunderstood each other 😁 The problem with that signature is that the key that you used to sign is not published on keys.gnupg.net:
|
The archieve I just sent is signed using a published signature. Hence, you should be able to verify it. |
If you made a new signature, I need to download it again :) The archive itself does not contain info, the signature file that you attached earlier was made using key 3C731FB9D54A7FF49D7497F17D7BF809E7378863 and not using http://keys.gnupg.net/pks/lookup?op=get&search=0x0F8EF5258DC38077 Could you please just from scratch attach new signature and new archive? :) |
Does it work now? :D |
Shows the current signature now. |
FInally, success with https://github.com/sayanarijit/xplr/releases/tag/v0.13.5 |
Works like a charm, thank you 🙂 |
Hey!
I've seen you sign one of the recent commits using your PGP key, that means you must be using PGP 😛
What do you think about signing releases? Instead of providing hashsums (or in addition, if you want).
PGP signatures will not only help ensuring that downloaded archive is not corrupted, but will also verify authenticity and in general reduce attack vector when your app is being built by other people and distributed via distro packages.
For packaging we'd need a signature for sources tarball (
.tar.gz
) that Github automatically provides for you on every release, signatures for other attachments would be appreciated as well 🙂Here's what I would suggest to do:
Publish your key to http://keys.gnupg.net/
The sources tarball is reproducible and can be recreated using the following
git
command:So for example, to get a signature you'd run this (mind where
v
before version is used and where is not):Let me know if you need any help! 🙂
The text was updated successfully, but these errors were encountered: