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: bug-gnu-emacs@gnu.org,  emacs-erc@gnu.org
Subject: Re: 29.1; ERC 5.5.0.29.1: Unnecessary .authinfo.gpg decryption causes connection failure to irc.libera.chat
Date: Fri, 22 Dec 2023 20:41:35 -0800	[thread overview]
Message-ID: <87zfy1pm2o.fsf@neverwas.me> (raw)
In-Reply-To: <CAJqVjv_RJ+F4s6o=FvvXSeM25KTz8+EVJ=t0aCRPrEmygz5vDA@mail.gmail.com> (Jake's message of "Sat, 23 Dec 2023 10:31:18 +1030")

Hi Jake,

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

> Hello
>
> I encountered an issue with authinfo interfering with ERC:
> When I attempt to connect to the irc.libera.chat server with a random
> nickname and no password, if a ~/.authinfo.gpg file is present on my
> system (or any .gpg file in the auth-sources variable), ERC attempts to
> decrypt this file when connecting. When I don't decrypt it, the
> connection fails.
>
> This occurs with emacs -Q.
>
> If I set auth-sources to nil, or change the name of the .gpg file to
> something else not in auth-sources, I get the expected behavior; i.e., it connects to the server.
>
> Steps to reproduce:
> 1. have an encrypted ~/.authinfo.gpg file (this will also be an element of
> the variable auth-sources, which is the default) 
> 2. emacs -Q
> 3. M-x erc-tls
> interactively: RET on default values irc.libera.chat and 6697, then enter a unique nickname and do not
> enter a password
> 4. be prompted to decrypt ~/.authinfo.gpg

I haven't tried very hard to reproduce this yet, but I can't seem to get
Emacs to prompt me from emacs -Q. It just decrypts the file straight
away if it has access to the key it was encrypted with and fails
otherwise. So, I was wondering if this prompt is coming from somewhere
external, such as a secrets manager or a TTY pinentry program, for
example,

  Please enter the passphrase to unlock the OpenPGP secret key:
  "Your Name <you@example.com>"
  3071 RSA key, ID DEAD..BEEF
  created 2023-12-22 17:30 (main key ID ...).
  
  Passprhase: ____________________________

  <OK> <Cancel>

(although, from your description, it seems like you're using graphical
Emacs). Also, is the "irc.libera.chat:6697" buffer completely blank
after the failure? And is there anything relevant recorded in the
"*Messages*" buffer? Perhaps something like:

  For information about GNU Emacs and the GNU system, type C-h C-a.
  Decrypting /root/.authinfo.gpg...done
  epa-file-insert-file-contents:
  Opening input file: Decryption failed, , No secret key

I'm mainly trying to avoid having to replicate your setup in a VM.

TIA,
J.P.



  reply	other threads:[~2023-12-23  4:41 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. [this message]
2023-12-23  8:00   ` Jake
2023-12-23 16:02     ` bug#67978: " J.P.

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=87zfy1pm2o.fsf@neverwas.me \
    --to=jp@neverwas.me \
    --cc=bug-gnu-emacs@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.