* ERC do not use my password from authinfo
@ 2024-05-26 3:19 Sébastien Gendre
2024-05-26 9:14 ` Zaichuan Du
2024-05-26 20:17 ` J.P.
0 siblings, 2 replies; 7+ messages in thread
From: Sébastien Gendre @ 2024-05-26 3:19 UTC (permalink / raw)
To: help-gnu-emacs@gnu.org
[-- Attachment #1: Type: text/plain, Size: 850 bytes --]
Hello,
I try to connect to an IRC server, with ERC, but I have a problem to make
it use my password saved in ~/.authinfo.
In my .emacs/init.el, I have defined this interactive function to
connect to Libera.chat with ERC:
(defun erc-mememememe@libera.chat ()
"Log on freenode with mememememe user"
(interactive)
(erc-tls :server "irc.libera.chat"
:port 6697
:nick "mememememe")
)
On my ~/.authinfo.gpg file, I have an entry for Libera.ch server, with
my nickname:
machine irc.libera.chat login mememememe password…
But when I run the function "erc-mememememe@libera.chat", ERC connect
without my password.
I didn't found any specific information on the manual about why. My
Emacs version is 29.3.
Someone have an idea ?
Best regards
-------
Gendre Sébastien
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 849 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ERC do not use my password from authinfo
2024-05-26 3:19 ERC do not use my password from authinfo Sébastien Gendre
@ 2024-05-26 9:14 ` Zaichuan Du
2024-05-27 3:15 ` Sébastien Gendre
2024-05-26 20:17 ` J.P.
1 sibling, 1 reply; 7+ messages in thread
From: Zaichuan Du @ 2024-05-26 9:14 UTC (permalink / raw)
To: Sébastien Gendre; +Cc: help-gnu-emacs@gnu.org
On 26 May 2024, Sébastien Gendre wrote:
Hi,
You will have to retrieve password by setting the :password key, like this
#+begin_src elisp
(erc-tls :server "irc.libera.chat"
:port 6697
:nick "mememememe"
:password (auth-source-pick-first-password :host "irc.libera.chat"))
#+end_src
> Hello,
>
> I try to connect to an IRC server, with ERC, but I have a problem to make
> it use my password saved in ~/.authinfo.
>
>
>
> In my .emacs/init.el, I have defined this interactive function to
> connect to Libera.chat with ERC:
>
>
> (defun erc-mememememe@libera.chat ()
> "Log on freenode with mememememe user"
> (interactive)
> (erc-tls :server "irc.libera.chat"
> :port 6697
> :nick "mememememe")
> )
>
>
> On my ~/.authinfo.gpg file, I have an entry for Libera.ch server, with
> my nickname:
>
>
> machine irc.libera.chat login mememememe password…
>
>
> But when I run the function "erc-mememememe@libera.chat", ERC connect
> without my password.
>
> I didn't found any specific information on the manual about why. My
> Emacs version is 29.3.
>
> Someone have an idea ?
>
>
>
> Best regards
>
> -------
> Gendre Sébastien
>
--
Zaichuan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ERC do not use my password from authinfo
2024-05-26 3:19 ERC do not use my password from authinfo Sébastien Gendre
2024-05-26 9:14 ` Zaichuan Du
@ 2024-05-26 20:17 ` J.P.
2024-05-27 3:21 ` Sébastien Gendre
1 sibling, 1 reply; 7+ messages in thread
From: J.P. @ 2024-05-26 20:17 UTC (permalink / raw)
To: Sébastien Gendre; +Cc: help-gnu-emacs, emacs-erc
Hi Sébastien,
Sébastien Gendre <seb@k-7.ch> writes:
> Hello,
>
> I try to connect to an IRC server, with ERC, but I have a problem to make
> it use my password saved in ~/.authinfo.
>
> In my .emacs/init.el, I have defined this interactive function to
> connect to Libera.chat with ERC:
>
> (defun erc-mememememe@libera.chat ()
> "Log on freenode with mememememe user"
> (interactive)
> (erc-tls :server "irc.libera.chat"
> :port 6697
> :nick "mememememe")
> )
>
> On my ~/.authinfo.gpg file, I have an entry for Libera.ch server, with
> my nickname:
>
> machine irc.libera.chat login mememememe password…
>
> But when I run the function "erc-mememememe@libera.chat", ERC connect
> without my password.
>
> I didn't found any specific information on the manual about why. My
> Emacs version is 29.3.
>
> Someone have an idea?
I tried a similar setup with Emacs 29 (21b2954c) and cannot reproduce
your issue.
Contents of ~/.authinfo:
machine irc.libera.chat user mynick password mypass
From emacs -Q:
M-: (erc-tls :server "irc.libera.chat" :port 6697 :nick "mynick") RET
Please try again from emacs -Q, maybe with a temporary ~/.authsource
(with and without the .gpg). And when reporting back, please mention the
contents of the relevant buffers, if any. And maybe also eval
(require 'erc)
(erc-toggle-debug-irc-protocol)
prior to connecting, and then check the *erc-protocol* buffer for clues
afterwards. Be sure to restart Emacs whenever you tweak ~/.authsource to
ensure you're not hitting the cache. And if you haven't already, see the
suggestions in the troubleshooting portion of the manual [1].
Thanks,
J.P.
P.S. In an effort to spare the good people of this list from excessive
ERC chatter, perhaps consider replacing the help-gnu-emacs@gnu.org with
emacs-erc@gnu.org in the Cc of any further related correspondences.
[1] https://elpa.gnu.org/devel/doc/erc.html#Troubleshooting-1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ERC do not use my password from authinfo
2024-05-26 9:14 ` Zaichuan Du
@ 2024-05-27 3:15 ` Sébastien Gendre
2024-05-27 8:04 ` Zaichuan Du
0 siblings, 1 reply; 7+ messages in thread
From: Sébastien Gendre @ 2024-05-27 3:15 UTC (permalink / raw)
To: Zaichuan Du; +Cc: help-gnu-emacs@gnu.org
I tried to set the password, like you say, but the result is the same:
Erc still logging without password.
The message in the minibuffer even say: "Logging in without password".
Zaichuan Du <duzaichuan@hotmail.com> writes:
> On 26 May 2024, Sébastien Gendre wrote:
>
> Hi,
>
> You will have to retrieve password by setting the :password key, like this
>
> #+begin_src elisp
> (erc-tls :server "irc.libera.chat"
> :port 6697
> :nick "mememememe"
> :password (auth-source-pick-first-password :host "irc.libera.chat"))
> #+end_src
>
>> Hello,
>>
>> I try to connect to an IRC server, with ERC, but I have a problem to make
>> it use my password saved in ~/.authinfo.
>>
>>
>>
>> In my .emacs/init.el, I have defined this interactive function to
>> connect to Libera.chat with ERC:
>>
>>
>> (defun erc-mememememe@libera.chat ()
>> "Log on freenode with mememememe user"
>> (interactive)
>> (erc-tls :server "irc.libera.chat"
>> :port 6697
>> :nick "mememememe")
>> )
>>
>>
>> On my ~/.authinfo.gpg file, I have an entry for Libera.ch server, with
>> my nickname:
>>
>>
>> machine irc.libera.chat login mememememe password…
>>
>>
>> But when I run the function "erc-mememememe@libera.chat", ERC connect
>> without my password.
>>
>> I didn't found any specific information on the manual about why. My
>> Emacs version is 29.3.
>>
>> Someone have an idea ?
>>
>>
>>
>> Best regards
>>
>> -------
>> Gendre Sébastien
>>
<#secure method=pgpmime mode=sign>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ERC do not use my password from authinfo
2024-05-26 20:17 ` J.P.
@ 2024-05-27 3:21 ` Sébastien Gendre
2024-05-27 4:15 ` J.P.
0 siblings, 1 reply; 7+ messages in thread
From: Sébastien Gendre @ 2024-05-27 3:21 UTC (permalink / raw)
To: J.P.; +Cc: help-gnu-emacs, emacs-erc
Hi,
I modified my ~/.authconfig.gpg file to add the IRC server port in the
entry for my password and then restart Emacs. Since this, it work.
So, for a reason I ignore, Emacs was not reading ~/authinfo.gpg and
I cannot reproduce it.
"J.P." <jp@neverwas.me> writes:
> Hi Sébastien,
>
> Sébastien Gendre <seb@k-7.ch> writes:
>
>> Hello,
>>
>> I try to connect to an IRC server, with ERC, but I have a problem to make
>> it use my password saved in ~/.authinfo.
>>
>> In my .emacs/init.el, I have defined this interactive function to
>> connect to Libera.chat with ERC:
>>
>> (defun erc-mememememe@libera.chat ()
>> "Log on freenode with mememememe user"
>> (interactive)
>> (erc-tls :server "irc.libera.chat"
>> :port 6697
>> :nick "mememememe")
>> )
>>
>> On my ~/.authinfo.gpg file, I have an entry for Libera.ch server, with
>> my nickname:
>>
>> machine irc.libera.chat login mememememe password…
>>
>> But when I run the function "erc-mememememe@libera.chat", ERC connect
>> without my password.
>>
>> I didn't found any specific information on the manual about why. My
>> Emacs version is 29.3.
>>
>> Someone have an idea?
>
> I tried a similar setup with Emacs 29 (21b2954c) and cannot reproduce
> your issue.
>
> Contents of ~/.authinfo:
>
> machine irc.libera.chat user mynick password mypass
>
>>From emacs -Q:
>
> M-: (erc-tls :server "irc.libera.chat" :port 6697 :nick "mynick") RET
>
> Please try again from emacs -Q, maybe with a temporary ~/.authsource
> (with and without the .gpg). And when reporting back, please mention the
> contents of the relevant buffers, if any. And maybe also eval
>
> (require 'erc)
> (erc-toggle-debug-irc-protocol)
>
> prior to connecting, and then check the *erc-protocol* buffer for clues
> afterwards. Be sure to restart Emacs whenever you tweak ~/.authsource to
> ensure you're not hitting the cache. And if you haven't already, see the
> suggestions in the troubleshooting portion of the manual [1].
>
> Thanks,
> J.P.
>
> P.S. In an effort to spare the good people of this list from excessive
> ERC chatter, perhaps consider replacing the help-gnu-emacs@gnu.org with
> emacs-erc@gnu.org in the Cc of any further related correspondences.
>
> [1] https://elpa.gnu.org/devel/doc/erc.html#Troubleshooting-1
<#secure method=pgpmime mode=sign>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ERC do not use my password from authinfo
2024-05-27 3:21 ` Sébastien Gendre
@ 2024-05-27 4:15 ` J.P.
0 siblings, 0 replies; 7+ messages in thread
From: J.P. @ 2024-05-27 4:15 UTC (permalink / raw)
To: Sébastien Gendre; +Cc: help-gnu-emacs, emacs-erc
Sébastien Gendre <seb@k-7.ch> writes:
> Hi,
>
> I modified my ~/.authconfig.gpg file to add the IRC server port in the
> entry for my password and then restart Emacs. Since this, it work.
That's interesting, thanks. Someone else recently reported failed
lookups (with a different backend) when a stored entry lacks a port
field. Sadly, they couldn't provide an exact recipe.
> So, for a reason I ignore, Emacs was not reading ~/authinfo.gpg and
> I cannot reproduce it.
If you do come up with a way to reliably reproduce this, please open a
bug report with M-x erc-bug RET.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ERC do not use my password from authinfo
2024-05-27 3:15 ` Sébastien Gendre
@ 2024-05-27 8:04 ` Zaichuan Du
0 siblings, 0 replies; 7+ messages in thread
From: Zaichuan Du @ 2024-05-27 8:04 UTC (permalink / raw)
To: Sébastien Gendre; +Cc: help-gnu-emacs@gnu.org, emacs-erc
My fault. I did not notice there is already an integration between ERC
and auth-source. The :password keyword is not a must. But I cannot
reproduce your issue either.
On 27 May 2024, Sébastien Gendre wrote:
> I tried to set the password, like you say, but the result is the same:
> Erc still logging without password.
>
> The message in the minibuffer even say: "Logging in without password".
>
>
> Zaichuan Du <duzaichuan@hotmail.com> writes:
>
>> On 26 May 2024, Sébastien Gendre wrote:
>>
>> Hi,
>>
>> You will have to retrieve password by setting the :password key, like this
>>
>> #+begin_src elisp
>> (erc-tls :server "irc.libera.chat"
>> :port 6697
>> :nick "mememememe"
>> :password (auth-source-pick-first-password :host "irc.libera.chat"))
>> #+end_src
>>
>>> Hello,
>>>
>>> I try to connect to an IRC server, with ERC, but I have a problem to make
>>> it use my password saved in ~/.authinfo.
>>>
>>>
>>>
>>> In my .emacs/init.el, I have defined this interactive function to
>>> connect to Libera.chat with ERC:
>>>
>>>
>>> (defun erc-mememememe@libera.chat ()
>>> "Log on freenode with mememememe user"
>>> (interactive)
>>> (erc-tls :server "irc.libera.chat"
>>> :port 6697
>>> :nick "mememememe")
>>> )
>>>
>>>
>>> On my ~/.authinfo.gpg file, I have an entry for Libera.ch server, with
>>> my nickname:
>>>
>>>
>>> machine irc.libera.chat login mememememe password…
>>>
>>>
>>> But when I run the function "erc-mememememe@libera.chat", ERC connect
>>> without my password.
>>>
>>> I didn't found any specific information on the manual about why. My
>>> Emacs version is 29.3.
>>>
>>> Someone have an idea ?
>>>
>>>
>>>
>>> Best regards
>>>
>>> -------
>>> Gendre Sébastien
>>>
> <#secure method=pgpmime mode=sign>
>
>
--
Zaichuan
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-05-27 8:04 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-26 3:19 ERC do not use my password from authinfo Sébastien Gendre
2024-05-26 9:14 ` Zaichuan Du
2024-05-27 3:15 ` Sébastien Gendre
2024-05-27 8:04 ` Zaichuan Du
2024-05-26 20:17 ` J.P.
2024-05-27 3:21 ` Sébastien Gendre
2024-05-27 4:15 ` J.P.
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).