all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "J.P." <jp@neverwas.me>
To: Jake <jforst.mailman@gmail.com>
Cc: 67978@debbugs.gnu.org, emacs-erc@gnu.org
Subject: bug#67978: 29.1; ERC 5.5.0.29.1: Unnecessary .authinfo.gpg decryption causes connection failure to irc.libera.chat
Date: Sat, 23 Dec 2023 08:02:11 -0800	[thread overview]
Message-ID: <87frzslxfg.fsf__16481.8681938172$1703347421$gmane$org@neverwas.me> (raw)
In-Reply-To: <CAJqVjv-k_4CkBj+XOfhS6JWCbu4VLXr5PCJxnCvW3zOP3Qebjg@mail.gmail.com> (Jake's message of "Sat, 23 Dec 2023 08:00:39 +0000")

Hi Jake,

Jake <jforst.mailman@gmail.com> writes:

> Hi J.P.
>
> Thanks for taking the time.

You're very welcome.

>> It just decrypts the file straight away if it has access to the key
>> it was encrypted with and fails otherwise.
> It sounds like you've successfully reproduced it, because it's
> attempted to decrypt the auth-source file.

Hard to say, but hopefully it's close enough to what you're
experiencing.

> Now I feel like I'm definitely missing something. Why does it do this?
> I assume nothing in this file is required to connect to
> irc.libera.chat, since the connection succeeds if the file is not
> present.

Right, nothing in the file is needed unless you've arranged for it to
be. By default, ERC usually checks for server and other passwords when
the protocol presents an opportunity. In most cases, there's a specific
function-valued option, like `erc-auth-source-server-function', that
corresponds to a given opportunity. Setting any of these options to nil
typically inhibits `auth-source' queries for that particular context. So
you can always resort to that as a workaround.

>> So, I was wondering if this prompt is coming from somewhere external,
>> such as a secrets manager or a TTY pinentry program
> I've had the prompt from gnome keyring on Ubuntu (I assume that's what
> it is) and gtk-pinentry on another machine. But my issue is that the
> prompt occurs at all.
>
>> Also, is the "irc.libera.chat:6697" buffer completely blank
>> after the failure? 
> yes it is blank.
>
>> And is there anything relevant recorded in the
>> "*Messages*" buffer?
> Decrypting /home/jake/.authinfo.gpg...done
> epa-file-insert-file-contents: Opening input file: Decryption failed,
> , No secret key

That's helpful, thanks. I believe what's happening in your case is that
your Gnome Keyring's GPG integration needs attention, hopefully only in
the configuration department. If libsecret has been authorized to store
the key you're being prompted to provide a passphrase for, it should
show up when you query the service over DBus. But before messing with
that, make sure to tick the appropriate "remember this" box the next
time you provide your passphrase in a popup dialog. From then on, you
shouldn't be prompted, though you may have to log out and back in for it
to stick [1].

In any case, I think ERC users should be allowed to ignore errors
signaled by its default `auth-source' queries, so I've added a prompt
that asks whether to proceed anyway when one occurs. It's preceded by an
annoying warning, which you can customize away in the usual fashion, in
this case by setting the option `warning-suppress-types' or
`warning-suppress-log-types' to include the list (erc auth-source).

Feel free to try out the changes on HEAD [2] and report back. If that's
too much trouble, you can wait for ERC 5.6, which should be released in
the coming weeks.

Thanks,
J.P.

[1] https://emacs-erc.gitlab.io/bugs/archive/doc/erc.html#Troubleshooting-1
[2] https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=5fb9d6c5





      reply	other threads:[~2023-12-23 16:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-23  0:01 bug#67978: 29.1; ERC 5.5.0.29.1: Unnecessary .authinfo.gpg decryption causes connection failure to irc.libera.chat Jake
2023-12-23  4:41 ` J.P.
2023-12-23  8:00   ` Jake
2023-12-23 16:02     ` J.P. [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='87frzslxfg.fsf__16481.8681938172$1703347421$gmane$org@neverwas.me' \
    --to=jp@neverwas.me \
    --cc=67978@debbugs.gnu.org \
    --cc=emacs-erc@gnu.org \
    --cc=jforst.mailman@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.