#GPG failing on pinentry

1 messages · Page 1 of 1 (latest)

final tinsel
#

Ubuntu: I have setup GPG and added the key to GH.

When I commit, the followiung GPG error occurs:

error: gpg failed to sign the data:
gpg: WARNING: server 'gpg-agent' is older than us (2.2.27 < 2.4.3)
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.27 < 2.4.3)
gpg: problem with fast path key listing: IPC parameter error - ignored
[GNUPG:] KEY_CONSIDERED B0F4Z2679C5E590C99DFC576AE72CBBBAC4FCECB 2
[GNUPG:] BEGIN_SIGNING H8
[GNUPG:] PINENTRY_LAUNCHED 5381 gnome3 1.1.1 - - :0 - 1000/1000 -
gpg: signing failed: pinentry error
[GNUPG:] FAILURE sign 83886166
gpg: signing failed: pinentry error
fatal: failed to write commit object

We can ignore the gpg-agent warnings, they don't affect anything. The bit that might be of concern is pinentry error but I've followed a few google results but can't get it to work.

Help?

fossil pelicanBOT
#

<@&987246964494204979> please have a look, thanks.

#

Here is an AI assisted attempt to answer your question 🤖. Maybe it helps! In any case, a human is on the way 👍. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.

#

han us (2.2.19 < 2.2.20)
gpg: problem with the agent: No pinentry
gpg: signing failed: No pinentry
error: unable to sign the commit


This error occurs because GPG is unable to find a pinentry program to prompt for the passphrase. To fix this issue, you can try the following solutions:

1. Install a pinentry program:
   - For macOS, you can install `pinentry-mac` using Homebrew:
     ```
     brew install pinentry-mac
     ```
   - For Linux, you can install `pinentry-curses` or `pinentry-gtk` depending on your preference:
     ```
     sudo apt-get install pinentry-curses
     ```
     or
     ```
     sudo apt-get install pinentry-gtk
     ```

2. Configure GPG to use the installed pinentry program by adding the following line to your `~/.gnupg/gpg-agent.conf` file:

pinentry-program /usr/bin/pinentry-curses

or

pinentry-program /usr/bin/pinentry-gtk-2


3. Restart the GPG agent by running the following command:

gpgconf --kill gpg-agent


After applying these changes, try committing again and see if the error persists.
final tinsel
#

pinentry-curses is already the newest version (1.1.1-1build2).

#

pinentry-gtk does not exist

final tinsel
#

I think I fixed it but now intellij does not show my gpg key 😐

final tinsel
#

yeah idk - it was here before:

#

I think I deleted the ~./gngpg folder or something to fix the pinentry issue

#

but that broke intellij 😦 😦

#

okay fixed

#

finally

fossil pelicanBOT
#

Closed the thread.

final tinsel
#

nope

#
14:43:19.394: [java-lexer] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false checkout -b test main^0 --
Switched to a new branch 'test'
14:43:28.562: [java-lexer] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -f -- build.gradle
14:43:28.566: [java-lexer] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false commit -F /tmp/git-commit-msg-.txt --
error: gpg failed to sign the data:
gpg: error running '/usr/libexec/keyboxd': exit status 2
gpg: failed to start keyboxd '/usr/libexec/keyboxd': General error
gpg: can't connect to the keyboxd: General error
gpg: error opening key DB: No Keybox daemon running
gpg: skipped "671E9FA74A5C7426": Input/output error
[GNUPG:] INV_SGNR 0 671E9FA74A5C7426
[GNUPG:] FAILURE sign 33587249
gpg: signing failed: Input/output error
fatal: failed to write commit object
final tinsel
slender sable
fossil pelicanBOT
#

@final tinsel

Your question has been closed due to inactivity.

If it was not resolved yet, feel free to just post a message below
to reopen it, or create a new thread.

Note that usually the reason for nobody calling back is that your
question may have been not well asked and hence no one felt confident
enough answering.

When you reopen the thread, try to use your time to improve the quality
of the question by elaborating, providing details, context, all relevant code
snippets, any errors you are getting, concrete examples and perhaps also some
screenshots. Share your attempt, explain the expected results and compare
them to the current results.

Also try to make the information easily accessible by sharing code
or assignment descriptions directly on Discord, not behind a link or
PDF-file; provide some guidance for long code snippets and ensure
the code is well formatted and has syntax highlighting. Kindly read through
https://stackoverflow.com/help/how-to-ask for more.

With enough info, someone knows the answer for sure 👍

final tinsel
final tinsel
slender sable
final tinsel
#

I created my gpg key, added it to GitHub but intellij for some reason can't see the key

#

Maybe it's permissions?

slender sable
final tinsel
#

Yeah

slender sable
#

did u added it to ur git config?

final tinsel
#

Yeah

#

username, email and gpg signing

slender sable
final tinsel
#

Something like that

#

But the gitconfig isn't the issue I think

#

Intellij can't see any keys

slender sable
#

@final tinsel does signing work in normal cli?

final tinsel
#

I need to check but I'm really ill right now so I'll do it later or tomorrow

final tinsel
#

Ty