-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add support for using external GPG instead of using built-in GPG #3997
Comments
Sounds like a good idea. You will need to imitate git-for-windows/build-extra@68fdb43 (which did the same for SSH). To do that:
|
I've been using Git for Windows with Gpg4Win as my GPG executable. All I did to make it work was to set Just sharing my workaround while waiting for this patch. |
Personally, I would suggest using a workaround similar to what I do with OpenSSH as shown here, i.e. ensure that the Git-Bash loads the desired SSH binaries before the supplied ones – I am fairly certain that it should work the same for gpg if the executables have the same name between the different versions. This has the added benefit that you can switch between them at will (which is most certainly a benefit for OpenSSH). If time allows I may attempt to contribute a GPG patch for the installer, though (no promises). |
This pull request addresses git-for-windows/git/issues/3997 by adding an additional detection mechanism for externally supplied GnuPG binaries to a new choice page in the installer and allows the user to "skip" the installation of the bundled GPG related binaries. Signed-off-by: Nikolas Grottendieck <[email protected]>
I just created a branch+commit that enables "skipping" GPG during the Git installation. It builds and works as advertised, I think. I didn't have time to verify it in depth, though. In particular I am not sure:
I am not sure whether adding more pages to the Wizard in this fashion … is a good user experience. It'd probably be interesting to have something similar to the components page (where the Terminal fragment, Explorer integration, etc.) are presented and allow users to skip installation of these pieces (ssh, gpg, curl, …?) in a single dialog. I won't be implementing such a thing, though. |
That thing already exists: https://github.com/git-for-windows/build-extra/blob/e3b0a68414f4222782d37dae34e828f59c558ca3/installer/install.iss#L103-L118
For more efficient review, could you please open a PR? You can mark it as "WIP" via the PR title, or as a draft PR, if you want to indicate that it should not be merged as-is. |
Yeah, I'll definitely open a PR (probably as WIP) soon. I just didn't get to it yesterday (mostly because of lack of testing on my part) but wanted to at least leave a note. It wasn't meant as a "please review"-message. More of a "I actually started working on it, feel free to have a look" sort of thing. |
This pull request addresses git-for-windows/git/issues/3997 by adding an additional detection mechanism for externally supplied GnuPG binaries to a new choice page in the installer and allows the user to "skip" the installation of the bundled GPG related binaries. Signed-off-by: Nikolas Grottendieck <[email protected]>
This pull request addresses git-for-windows/git/issues/3997 by adding an additional detection mechanism for externally supplied GnuPG binaries to a new choice page in the installer and allows the user to "skip" the installation of the bundled GPG related binaries. Signed-off-by: Nikolas Grottendieck <[email protected]>
Setup
defaults?
to the issue you're seeing?
None
Details
Windows PowerShell
Minimal, Complete, and Verifiable example
this will help us understand the issue.
The installer should ask which GPG executable should be used. I have installed Gpg4win and use it generate a GPG key, but Git’s GPG is not compatible to Gpg4win’s GPG (Gpg4win stores GPG keys at C:\Users\USERNAME\AppData\Roaming\gnupg while Git stores it at C:\Users\USERNAME\.gnupg). Because I have enabled the "gpgsign" config, I have to export the private key and reimport it at Git Bash.
Git use its own GPG so when I commit, I can always see this error "gpg: key "xxxxxxxxxxxxxxxx" not found: Skipped"
URL to that repository to help us with testing?
None
The text was updated successfully, but these errors were encountered: