This issue is discussed in the GnuPG forum:
https://forum.gnupg.org/t/problem-with-socket-connection-refused/4669/8.

It is fixed in libcrypt 1.11.0, according to this:
https://bugzilla.opensuse.org/show_bug.cgi?id=1226912#c3

The Ubuntu Noble (24.04) repo currently provides libcrypt 1.10.3 (package "libcrypt20").

The "Connection refused" message can be avoided by setting the 'log-file' option to a file instead of the socket. This causes the output to be written to that file.

I have not been able to have the output written to the terminal in an interactive session, which used to happen before the OS update. Therefore, I do the following:

    log="/path/to/gpg_$(date +'%Y%m%d-%H%M%S').log"
    gpg --log-file "$log" --verify file_to_verify.sig
    { cat "$log" && rm "$log"; } | tee -a "$HOME/.gnupg/gpg.log"

-aslamK

On 4/29/25 03:51, Bernhard Reiter via Gnupg-users wrote:
Am Sonntag 20 April 2025 08:51:44 schrieb aslamK:
The issue is therefore not with `gnu --verify`, but with the connection
to `log-socket`:
===
can't connect to '
socket:///home/user/.gnupg/log-socket
': Connection refused
===

Check your configuration, e.g. ~/.gnupg/gpg.conf
mine has an inactive
   #debug-level basic
   #log-file socket:///home/ber/.gnupg/log-socket
so I guess that you do have a `log-file` setting in your configuration
somewhere or

My config hasn't changed but I did upgrade my OS
(Ubuntu 20.04.2)

Ubuntu has changed the defaults.
Try setting log-file to a file to see if this changes the connection problem.
(Similiar options exist for gpg-agent.conf and dirmngr, make sure to restart
those daemons if you change their settings to see an effect.)

Bernhard



_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users


--
aslamK


_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users

Reply via email to