From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.help Subject: Re: Tramp behaviour with ~/.authinfo.gpg; two queries Date: Sat, 11 Jan 2020 17:28:12 +0100 Message-ID: <874kx2gdpf.fsf@gmx.de> References: <0100016f9445d858-a7113286-e808-4a19-8903-83b850c082f2-000000@email.amazonses.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="122557"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Emacs mailing list To: Pankaj Jangid Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 11 17:31:51 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iqJeP-0005I8-VM for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 11 Jan 2020 17:30:14 +0100 Original-Received: from localhost ([::1]:58882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iqJeN-0006Tc-CQ for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 11 Jan 2020 11:30:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49522) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iqJcc-0006T4-7r for help-gnu-emacs@gnu.org; Sat, 11 Jan 2020 11:28:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iqJca-00011f-Td for help-gnu-emacs@gnu.org; Sat, 11 Jan 2020 11:28:21 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:41117) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iqJcZ-0000ql-E8 for help-gnu-emacs@gnu.org; Sat, 11 Jan 2020 11:28:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1578760093; bh=nMk6FSdBAcKpKvDEuTkkeNIoi8wwDh/MIMPrhgiVf6g=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=ipQLLMbmMW05tumHZlbBiDiK4d9SUKvSCMtApzRLGwxOa78eqdPwXSAOdyrvtRB7q LKJKDgxwv0gTMPTLpolWbwL6nizwetl3BKLAA5WGlI5zoEhJzIC41VEb4Xv7FS6K0r cJv4rtxY+t+itW9C7YbvrpXqNbGA6VgwUXtPqMhU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from detlef.gmx.de ([212.86.59.73]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MXGvM-1jBe7v2C1W-00YfXo; Sat, 11 Jan 2020 17:28:13 +0100 In-Reply-To: <0100016f9445d858-a7113286-e808-4a19-8903-83b850c082f2-000000@email.amazonses.com> (Pankaj Jangid's message of "Sat, 11 Jan 2020 11:03:23 +0000") X-Provags-ID: V03:K1:9TrGVLY3hA1S2TGiKC5+cnGxe4oNH7aNGVfuuqxgYtwBzqL0jCD iL9ZPQoJaRlVbPyZ824yvnuEsDc91vYOazlKot+LVEzGWlGVhVg2aorCWn03+GMCrXDmDtI 7ry8zCWiQ/zp4XGgatHwwJAASQLyA03ntG8InitvIfoG6YCBnWMGaysbjaLD2g6Z9Ejbs47 Nzbrw8+sU+U+gMnRxVSPg== X-UI-Out-Filterresults: notjunk:1;V03:K0:+duqaZcflv4=:KzlTpuKgNRKdIa1eOCtZ8y avDpZcyQVyVwNHNgdVo+nEjCIwIpCvmxWNAPvQegR8CBk23rjolxUP3TZN63fnokEBTXfWBft s3SP5TDK5C9yBv9Xe+2HKsu0u3Hxp0TkpK/q6kWIVxs4j6yMVlByQKT/vXJVFxr3PZByYzcRq d6uJReb5ya9ga+/B4NWiAic2HU1evpYHwa3wEAmkxWEo3v4Spj8yTNo03IU2Xohv2U5NBlK/G wkmHD/2u1130FKdS4er9860VbkbIj1+Qz2oOIjyFaRrX4PtaTGcpN/EhAwdj749wJh1l8Hcul BwEVlgfuNDgPVHXRyYGFPUAXkDfgnB9S3ezmKlMDCd2iGD4Djp/qHPUk5MvmOecXkSKpn78+F ObM0WskByFdPvtT3gXngFVSgUQfDnA76nZwP2wfJ9c4AAJ0qkjFm2p0gsL+YOOOG/cpv2gBJ/ fhIiCkBfFc/JIWIhqgF+EoI2eM3eqHCQt9S0ci0rNA6pUV6+RDhoaIqa7P6hRUYbIQ6sbxdpp yvU7c7w7M1P+VlSPKPgyb8Ei5ArdsnzELLtPd59lZ0+PVu8wbX0nAiou2OJjtZpd3BFBLSGnU hmrVhDKrPo1tIByvN75NSjqIvtU4Ng86bA+8+55Ffku4bma4UAnC/YH0/p7f0BBvjqI4CzbXx 9tS0ETb3j9Qw1bMrw1bgzqlGcTWv6pQ+Pm3I6haWXhIauEPHNnHWZ5TSVi/gVoG5lHYiawfu9 /vyQrmEmZYfcF+4hUSLKrFUR9FGoSwcUseQSQHtezbJ+4MrlJ2F0bayYyh9u73ukjh+usGk/ X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.15.18 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:122206 Archived-At: Pankaj Jangid writes: Hi, > Two observations on Tramp. I need help in getting around. Tramp doesn't handle authinfo files itself. It uses auth-source.el for this. > * Observation one > > In a fresh instance of Emacs (27.0.60), if I try to open a remote ssh > file, Tramp tries to load ~/.authinfo.gpg and asks for passphrase. This > is okay. But the problem is this - as I start typing "/ssh:.." the > passphrase prompt also come at the same input area. And when I start > typing passphrase characters it starts switching back and forth between > "Find file:" and "Passphrase:" prompts. I have (setq epg-pinentry-mode > 'loopback) in my config. > > As a workaround, I cancel the operation. And then I start Gnus (or some > other package that can load ~/.authinfo.gpg). Enter passphrase. And then > open the desired remote file. > > Is there a proper way to handle this? No idea. I'll try to reproduce. > * Second observation > > When I open a remote ssh file and connect to the server for the first > time, Tramp offers to save the password in ~/.authinfo even if the file > ~/.authinfo.gpg exists and is already loaded (by some other package like > Gnus). > > How can I tell Tramp to save passwords in ~/.authinfo.gpg? The default value of auth-sources is '("~/.authinfo" "~/.authinfo.gpg" "~/.netrc") I suppose that auth-source checks one file after the other whether it exist, when searching for a password. But when it wants to save the password, it seems to take the first entry in auth-sources, instead of checking, whether one of the files exist (and use this one). In your case, I recommend to change the value of auth-sources to just '("~/.authinfo.gpg") However, this seems to be a bug in auth-source.el, so you might write a bug report. > Regards Best regards, Michael.