unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Tramp behaviour with ~/.authinfo.gpg; two queries
@ 2020-01-11 11:03 Pankaj Jangid
  2020-01-11 11:32 ` Colin Baxter
  2020-01-11 16:28 ` Michael Albinus
  0 siblings, 2 replies; 8+ messages in thread
From: Pankaj Jangid @ 2020-01-11 11:03 UTC (permalink / raw)
  To: Emacs mailing list

Two observations on Tramp. I need help in getting around.

* 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?

* 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?

Regards
-- 
Pankaj Jangid





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Tramp behaviour with ~/.authinfo.gpg; two queries
  2020-01-11 11:03 Tramp behaviour with ~/.authinfo.gpg; two queries Pankaj Jangid
@ 2020-01-11 11:32 ` Colin Baxter
  2020-01-11 13:37   ` Pankaj Jangid
  2020-01-11 16:28 ` Michael Albinus
  1 sibling, 1 reply; 8+ messages in thread
From: Colin Baxter @ 2020-01-11 11:32 UTC (permalink / raw)
  To: Pankaj Jangid; +Cc: Emacs mailing list

>>>>> Pankaj Jangid <p4j@j4d.net> writes:

    > Two observations on Tramp. I need help in getting around.  *
    > 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.


Try (setq epa-pinentry-mode 'loopback)
            ^

Best wishes,



Colin Baxter
www.Colin-Baxter.com



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Tramp behaviour with ~/.authinfo.gpg; two queries
  2020-01-11 11:32 ` Colin Baxter
@ 2020-01-11 13:37   ` Pankaj Jangid
  2020-01-11 14:14     ` Colin Baxter
  0 siblings, 1 reply; 8+ messages in thread
From: Pankaj Jangid @ 2020-01-11 13:37 UTC (permalink / raw)
  To: Colin Baxter; +Cc: Emacs mailing list

Colin Baxter <m43cap@yandex.com> writes:

>>>>>> Pankaj Jangid <p4j@j4d.net> writes:
>
>     > Two observations on Tramp. I need help in getting around.  *
>     > 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.
>
>
> Try (setq epa-pinentry-mode 'loopback)

epa-pinentry-mode is just an alias for epg-pinentry-mode. epg-.. is the
preferred way now.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Tramp behaviour with ~/.authinfo.gpg; two queries
  2020-01-11 13:37   ` Pankaj Jangid
@ 2020-01-11 14:14     ` Colin Baxter
  0 siblings, 0 replies; 8+ messages in thread
From: Colin Baxter @ 2020-01-11 14:14 UTC (permalink / raw)
  To: Pankaj Jangid; +Cc: Emacs mailing list

>>>>> Pankaj Jangid <p4j@j4d.net> writes:

    > Colin Baxter <m43cap@yandex.com> writes:
    >>>>>>> Pankaj Jangid <p4j@j4d.net> writes:
    >> 
    >> > Two observations on Tramp. I need help in getting around.  * >
    >> 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.
    >> 
    >> 
    >> Try (setq epa-pinentry-mode 'loopback)

    > epa-pinentry-mode is just an alias for
    > epg-pinentry-mode. epg-.. is the preferred way now.

Thanks - I didn't know that.

Best wishes,

Colin Baxter
www.Colin-Baxter.com



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Tramp behaviour with ~/.authinfo.gpg; two queries
  2020-01-11 11:03 Tramp behaviour with ~/.authinfo.gpg; two queries Pankaj Jangid
  2020-01-11 11:32 ` Colin Baxter
@ 2020-01-11 16:28 ` Michael Albinus
  2020-01-13 10:10   ` Pankaj Jangid
  1 sibling, 1 reply; 8+ messages in thread
From: Michael Albinus @ 2020-01-11 16:28 UTC (permalink / raw)
  To: Pankaj Jangid; +Cc: Emacs mailing list

Pankaj Jangid <p4j@j4d.net> 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.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Tramp behaviour with ~/.authinfo.gpg; two queries
  2020-01-11 16:28 ` Michael Albinus
@ 2020-01-13 10:10   ` Pankaj Jangid
  2020-01-13 10:39     ` Pankaj Jangid
  2020-01-13 16:26     ` Michael Albinus
  0 siblings, 2 replies; 8+ messages in thread
From: Pankaj Jangid @ 2020-01-13 10:10 UTC (permalink / raw)
  To: Michael Albinus; +Cc: Emacs mailing list

Michael Albinus <michael.albinus@gmx.de> writes:

>> 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.
>

Michael, did you get any chance to reproduce this issue. Although, this
is not a serious issue at my end because this is just one time thing
because the password is saved in ~/.authinfo[.gpg]. But this could be
annoying for new users.

>> 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.

I have submitted a bug report for this.

Regards
-- 
Pankaj Jangid



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Tramp behaviour with ~/.authinfo.gpg; two queries
  2020-01-13 10:10   ` Pankaj Jangid
@ 2020-01-13 10:39     ` Pankaj Jangid
  2020-01-13 16:26     ` Michael Albinus
  1 sibling, 0 replies; 8+ messages in thread
From: Pankaj Jangid @ 2020-01-13 10:39 UTC (permalink / raw)
  To: Michael Albinus; +Cc: Emacs mailing list

>>> 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.
>>
>
> Michael, did you get any chance to reproduce this issue. Although, this
> is not a serious issue at my end because this is just one time thing
> because the password is saved in ~/.authinfo[.gpg]. But this could be
> annoying for new users.
>

Sorry for misleading message. It is annoying for everyone. Because when
the Emacs session is fresh, it always happens.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Tramp behaviour with ~/.authinfo.gpg; two queries
  2020-01-13 10:10   ` Pankaj Jangid
  2020-01-13 10:39     ` Pankaj Jangid
@ 2020-01-13 16:26     ` Michael Albinus
  1 sibling, 0 replies; 8+ messages in thread
From: Michael Albinus @ 2020-01-13 16:26 UTC (permalink / raw)
  To: Pankaj Jangid; +Cc: Emacs mailing list

Pankaj Jangid <p4j@j4d.net> writes:

Hi,

>>> 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.
>
> Michael, did you get any chance to reproduce this issue. Although, this
> is not a serious issue at my end because this is just one time thing
> because the password is saved in ~/.authinfo[.gpg]. But this could be
> annoying for new users.

I cannot reproduce it. In my case, the passphrase is asked in an own
window (not from Emacs), so there is no overlapping with the minibuffer.

Since I don't know epa/epg, you might teach me how I could reproduce
your behaviour.

>> However, this seems to be a bug in auth-source.el, so you might write a
>> bug report.
>
> I have submitted a bug report for this.

Thanks.

> Regards

Best regards, Michael.



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-01-13 16:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-11 11:03 Tramp behaviour with ~/.authinfo.gpg; two queries Pankaj Jangid
2020-01-11 11:32 ` Colin Baxter
2020-01-11 13:37   ` Pankaj Jangid
2020-01-11 14:14     ` Colin Baxter
2020-01-11 16:28 ` Michael Albinus
2020-01-13 10:10   ` Pankaj Jangid
2020-01-13 10:39     ` Pankaj Jangid
2020-01-13 16:26     ` Michael Albinus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).