Skip to content
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

Support commit signing with gpgme #817

Closed
wants to merge 2 commits into from
Closed

Support commit signing with gpgme #817

wants to merge 2 commits into from

Conversation

dnaka91
Copy link

@dnaka91 dnaka91 commented Jul 12, 2021

Support for creating signed commits with the help of gpgme as discussed in #97.

Currently still WIP, especially many potential corner cases due to manually implementing amend
as the git2 crate doesn't provide a function to amend + re-sign commits easily.

@dnaka91
Copy link
Author

dnaka91 commented Jul 15, 2021

Currently builds fail due to the missing gpgme library. made a few adjustments so it should work now on Linux and MacOS, but it's likely to still fail on Windows. I guess we'll have to set env vars accordingly.

Also, what would be the preferred way of linking? I guess only dynamic linking is an option, as static linking against GPLed libs would require to change the license of this project too.

If we link dynamically, the build process becomes more complicated, and distribution as well. We have to ask users to install the gpgme libraries.

  • On Linux that's just a apt-get install gpgme (or similar for other package managers.
  • On MacOS it's a simple brew install gpgme.
  • On Windows that would be either choco install gpg4win or manual installation. Problem here is that the installation target dir can be customized and gitui may not find them every time.

@Kqzz
Copy link

Kqzz commented Jul 18, 2021

would this fix this issue?

image

@mainrs
Copy link

mainrs commented Jan 11, 2022

As I already mentioned in sdttttt/gcr#53, gpgme is imo not a good choice for a cross-platform binary. It it inevitabely hard to get to compile on Windows and even if one manages to compile it, it only works in 32bit mode.
And I think that dynamic linking should be a no-go. It requires users to download the binary from their distribution. And on Windows it might not even work 100% of the time since the installation path can be changed by the user.

I think the only viable solution would be to either bite the bullet and actually try to make gpgme work for 32bit Windows on CI. Or to move on to sequoia_openpgp and try to that library.

@dnaka91
Copy link
Author

dnaka91 commented Jan 16, 2022

I actually never really started using gitui that much so I don't really find the motivation to complete this.

Compilation on windows doesn't really seem solvable neither so it's better to go another course. As mentioned sequoia-gpg might be one solution or maybe just doing the same as git and shell out to gpg.

Therefore I'm closing this in favor of another way of adding gpg support.

@dnaka91 dnaka91 closed this Jan 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants