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

Using gpg from Emacs #75

Open
sajith opened this issue May 11, 2024 · 2 comments
Open

Using gpg from Emacs #75

sajith opened this issue May 11, 2024 · 2 comments

Comments

@sajith
Copy link

sajith commented May 11, 2024

Since Emacs 28 has a bug that affects me, I'm trying to use Emacs 29.3 flatpak on Debian 12. Debian 12 has Flatpak 1.14.4. I'm stuck a little, because I can't sign my commit messages, which is a requirement in some of the projects that I work on.

When I try to do git commits using magit from Emacs flatpak, I get this error message:

error: gpg failed to sign the data:
gpg: WARNING: server 'gpg-agent' is older than us (2.2.40 < 2.4.5)
gpg: Note: Outdated servers may lack important security fixes.
gpg: Note: Use the command "gpgconf --kill all" to restart them.
[GNUPG:] WARNING server_version_mismatch 0 server 'gpg-agent' is older than us (2.2.40 < 2.4.5)
gpg: problem with fast path key listing: IPC parameter error - ignored
[GNUPG:] KEY_CONSIDERED 22D9BFBA256B7BFA7B16187C0C6DA6A29D5F02BA 2
[GNUPG:] BEGIN_SIGNING H10
[GNUPG:] PINENTRY_LAUNCHED 740866 gnome3 1.2.1 - dumb :0 - 1000/1000 -
gpg: signing failed: pinentry error
[GNUPG:] FAILURE sign 83886166
gpg: signing failed: pinentry error

fatal: failed to write commit object

Another problem: my (setq auth-sources '("~/.authinfo.gpg")) line also do not work.

Error while decrypting with "/usr/bin/gpg":

gpg: encrypted with rsa4096 key, ID 0x33E4FE3E31593C6C, created 2015-04-22
      "Sajith <[email protected]>"
gpg: WARNING: server 'gpg-agent' is older than us (2.2.40 < 2.4.5)
gpg: Note: Outdated servers may lack important security fixes.
gpg: Note: Use the command "gpgconf --kill all" to restart them.
gpg: using "0x0C6DA6A29D5F02BA" as default secret key for signing
gpg: problem with fast path key listing: IPC parameter error - ignored
gpg: public key decryption failed: pinentry error
gpg: decryption failed: pinentry error

I don't quite understand this. It seems to me that flatpak Emacs ships its own gpg, which is newer than what's on Debian 12. Can't the gpg in Emacs flatpak talk to its own gpg-agent then?

How can I make this work?

@sajith
Copy link
Author

sajith commented May 11, 2024

Adding (setq epg-pinentry-mode 'loopback) to .emacs seems to help. This causes Emacs to read gpg passphrase from minibuffer.

@sajith
Copy link
Author

sajith commented May 11, 2024

Turns out that (setq epg-pinentry-mode 'loopback) does not help. I'm still getting the first error message when doing a git commit.

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

No branches or pull requests

1 participant