-
-
Notifications
You must be signed in to change notification settings - Fork 573
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
GPG sign commits #97
Comments
Hi @nbigaouette thanks for your interest in the project. I did not even know that feature existed 🙈. I am going to need support by someone having experience with using signing in git for this. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@nils-a what do you mean? in fact someone is working on this issue
…On Tue, Oct 27, 2020 at 11:03 PM Nils Andresen ***@***.***> wrote:
@extrawurst <https://github.com/extrawurst> does your Reference of that
issue means that "someone" will simply need to implement the mentioned
workaround?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#97 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAF5U4HHRHH4VDIQ6CR6KRDSM47RVANCNFSM4NOI7FEQ>
.
|
Yes. I saw that after I commented. Hence the deletion of the comment. Sorry for that. 😇 |
@nils-a But as you can see in the PR it is non trivial and could use some support, so if you want to chime in... |
yes.. love to. Need to buy a book on rust first :-) |
@nils-a that's an easy step - see you soon then :P |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Is anybody still working on this? I used gpgme with git2 in one of my projects before and could probably integrate this rather quick. |
Not me. I'm still reading that book on rust to begin with... But there is also some discussion in #219 |
@dnaka91 absolutely have a go at it |
Sorry, I didn't have a chance to continue on this as I'm currently quite occupied with other things. I definitely have this on my to-do list though. |
Shouldn't the following lines in the [user]
name = YOUR_NAME
email = YOUR_EMAIL
signingkey = YOUR_SIGNING_KEY
[gpg]
program = GPG_BINARY_PATH
[commit]
gpgsign = true Any ideas why that isn't the case and does not with gitui? |
@bluefireoly gitui uses |
@bluefireoly I added #740 - it should not even allow you to commit now iff you have this config defined. this way it prevents you from generating unsigned commits even though you expressed that you need them to be signed |
Alright thank you, maybe that will prevent some people from finding this out when it is too late. |
I came across this issue today as I was still on v0.15 and was surprised when it let me commit without signing even with config set. Looking into it more, I came across this: Not sure if this issue is on libgit2 or the git2-rs, so not sure if any help or not. |
Hi, is there any way I could help? Although in a completely different context, I had to add support to GPG signatures to one of my own projects ( https://avatar-cli.dev ), so maybe I could help here. I did it the "dirty way" (by relying on the external git binary), but I guess it wouldn't be too complicated if I have to rely on a librarized version of it for this project. EDIT: I see that there were at least 3 PRs focused on that, all of them stalled. So... maybe it is that complicated. My take on this is that maybe we should find a way to split this feature into smaller ones, if that's even possible, so we can go one small step at a time. Also, for reference, I think that the last work on this topic actually belongs to this other PR: #910 , as #817 was closed. |
@castarco indeed, this is not a trivial thing to implement. I'd like to second your idea of splitting the feature into multiple smaller parts; some could even be merged while hidden behind a feature toggle (can be as simple as a comment). Before writing any code, I would propose to work on the following and sign each one off with @extrawurst:
The following are my partial proposals for discussion: 1) Define the requirements
2) Evaluate technology to aid the implementation
I'd propose to move forward with 3) Verbally express the implementation path(s)To be honest, I did not yet dive into the codebase, because there are too many open questions. |
hi @hendrikmaus and thanks for wrapping this up. this topic is long running and arguably one of the most requested features. I am glad you are going to approach this with such a thought out structure. since I am not using commit signing myself, my opinion on this is rather high level. my biggest concern is cross-platform support and testability. we need to make sure we come up with something that works on all three platforms and is well covered in tests, so that A) I can us the tests as a life raft if I need to maintain the code after potential contributors sailed away and B) to guarantee stability on the platforms I am not using myself. your points so far seem reasonable to me. I personally had no tendency for either gpgme or sequoia but I can follow your assessment! I assume in terms of slicing this I would make a first iteration without support of interactive pin entry, because adding that should be easy, we do a similar thing already for https credential input on demand. |
Update: I have started to study the source code of https://gitlab.com/sequoia-pgp/sequoia-octopus-librnp which the Sequoia-based OpenPGP Backend for Thunderbird. |
Any updates/progress on this? Is this feature actively being worked on? Am considering to start working on this myself |
I am doing research on the side to then propose an implementation verbally before writing code. |
Commits now can also be signed with |
My research on the topic is going slow, but steady. |
I want to share where I am currently at, so that I can gather feedback and we can iterate on the plan. I think we can assume that a user already signs commits using the
Now, Sequoia comes with a crate for IPC (inter process communication), which in turn comes with an implementation to talk to an existing If we can connect, Sequoia needs the public key to sign with. This is where we have to deviate from what I talked to the folks in the Sequoia IRC and, so far, the conclusion was that one technically only needs the keygrip (which is yet another thing
So, if |
A suggestion from the Sequoia IRC was to not store the gpg public key on disk. Because it might get out of sync and/or cause additional confusion later when the extra step for gitui is forgotten. The proposal was to do at least one shellout to What do you think? |
I had another chat with @extrawurst and we concluded to start with the existing shellout implementations. Anyone with an existing gpg signing setup can then start to use gitui without any additional setup. In #1544 gpg itself is added. The PR provides entrypoints for ssh as well as x509 signing. However, we discussed to add a new option to gitconfig, which will gate pure Rust implementations (or as close as we can reasonably get). |
thanks @hendrikmaus for taking a crack at it. Everyone subscribed here please take a go at the PR: #1544 |
I realize that I'm very late to the party, but I also had some trouble implementing signed commit's in ripasso ( https://github.com/cortex/ripasso/blob/master/src/git.rs#L50 ) and wrote this blog post about it: https://blog.hackeriet.no/signing-git-commits-in-rust/ It might help someone. |
How about signing with SSH key. Is this easier than use GPG?
https://github.blog/2021-11-15-highlights-from-git-2-34/#tidbits github also supports it https://docs.github.com/en/authentication/managing-commit-signature-verification/telling-git-about-your-signing-key#telling-git-about-your-ssh-key |
AFAIK, it is much less popular than gpg signing. |
I disagree. We simply don't know IMO. |
SSH signing has a PR: #2047 |
This is merged, please everyone give the recent master a try to make the next release rock solid! |
This works just tested on master with the default config (I haven't installed |
Hey everyone in case you were hesitant to test this by having to build from source, please use our new nightly releases to give it a spin: https://github.com/extrawurst/gitui/blob/master/NIGHTLIES.md |
I am happy to report that the nightly gitui.exe was compatible with my signed commit on Windows! (The link to the windows versions in nightlies.md is wrong but that's really a footnote here). |
@mlabbe thanks for the hint, fixed the windows links |
I can also report that this worked for me on my Linux workstation. |
All my commits are required to be signed at work. It would be awesome to be able to commit directly in gitui; for now I can stage files/hunk and commit using
git
directly.Thanks!
The text was updated successfully, but these errors were encountered: