Subject: Re: bug#39111: 27.0.60; Tramp offers to save password in ~/.authinfo instead of ~/.authinfo.gpg

From: Michael Albinus <[email-masked]>
Date: Tue, 31 Aug 2021 10:13:04 +0200

Lars Ingebrigtsen <[email-masked]> writes:

Hi Lars,

> I tested this now with Emacs 28 (and without ssh-agent).  When saying:
>
> C-x C-f /ssh:stories:
>
> and filling in user name and passphrase to my ssh key, Emacs asked
> whether to save the info to ~/.authinfo (which is correct behaviour in
> my case, since I have .authinfo and not .authinfo.gpg).
>
> But that doesn't happen with "emacs -Q".  Hm...  Oh, it also asks for a
> user name in the non-Q case?  Is "-Q" inhibiting usage of ~/.authinfo?

Yes, this is intended. When instructing users to hunt Tramp bugs, wrong
passwords have been in the way, several times. That's why the call to
auth-source-search is disabled when calling "emacs -Q". This is
documented in the Tramp manual, node "(tramp) Bug Reports".

If you want to debug tramp-read-passwd calling auth-source-search, you
can do the trick by

# emacs -Q --eval '(setq tramp-cache-read-persistent-data t)'

It's a dirty trick to be applied only for this use case. I've added a
comment to tramp-read-passwd explaining this, pushed to master.

Best regards, Michael.