netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

[NETBEANS-3972] Draft implementation of GIT GPG signing

Open Caffe1neAdd1ct opened this issue 5 years ago • 4 comments

Initial draft of GIT GPG commit signing, I'm not happy with this implementation and need some guidance on how to improve this implementation.

  1. Alteration of the commit() command construct signature breaks a lot of tests and doesn't feel like the right way to pass through the GPG passphrase to jgit/bouncycastle.
  2. GPG Passphrase popup doesn't obfuscate the input and isn't a great UX being separate and before the commit window for file selection/author/committer etc
  3. Override checkbox on the commit window to enable/disable signing like author/committer would also be useful.

I've built this on the 11.3 stable release of netbeans but will follow guidance on how to raise a new pull request as needed. To build/run at the moment all tests in Git and Git Client Library need disabling for now due to the commit command construct change.

I'm happy to continue attempting to implement this, but Java isn't my primary language (so please go easy).

Calling for suggestions and guidance on implementation.

Caffe1neAdd1ct avatar Apr 23 '20 23:04 Caffe1neAdd1ct

@Caffe1neAdd1ct, please have discussion on dev list to find some help. I have no idea how to help here.

ebarboni avatar Apr 30 '20 15:04 ebarboni

needs to be rebased on master since it is pointing at an EOL branch.

mbien avatar Jul 18 '22 11:07 mbien

Please, fix this ticket. NB release 14 is still affected.

I tried all instruction for Windows, but it doesn't work in NB, work fine manually in cmd with -S flag on commit. NB show messegebox with error "org.eclipse.jgit.api.errors.JGitInternalException: missing credentials provider" and thats all.

hotis avatar Jul 27 '22 08:07 hotis

@hotis please take that conversation elsewhere - mailing list or discussions - thanks!

neilcsmith-net avatar Jul 27 '22 08:07 neilcsmith-net

needs to be rebased on master since it is pointing at an EOL branch.

Is this the only thing holding this PR back @mbien ?

timothystone avatar May 30 '23 16:05 timothystone

Is this the only thing holding this PR back

@timothystone probably not but this would be a start. PR mentioned failing tests etc, but our CI host changed in the meantime so they are no longer visible.

mbien avatar May 30 '23 16:05 mbien

is anyone working on this? I could take over

luis-guideti avatar Oct 29 '23 04:10 luis-guideti

@FurmigaHumana at least there are no other discussion on going about this. I think the hard part is to define what you want to accomplish and how that might fit into extensions in the future. For example I would expect the support to hook into an OpenPGP agent, just as the SSH support hooks into the SSH agent, maybe not initially, but at least with an perspective. I would try to avoid adding new API if possible. It might be required to indicate "I want to sign" info, but at least the passphrase could be provided using a custom implemenation of GitClientCallback and modifying the CommitCommand to install a credentials provider, just as is done in the TransportCommand.

matthiasblaesing avatar Nov 13 '23 18:11 matthiasblaesing