Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* how to set gnus authinfo file
@ 2016-06-12  6:12 Alice Bob
  2016-06-12  9:58 ` Martin
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Alice Bob @ 2016-06-12  6:12 UTC (permalink / raw)
  To: info-gnus-english

Emacs 24.5; Gnus 5.13.

I would like to set file path of `~/.authinfo.gpg' which stores nntp,
nnimap, smtp passwords. This is the code snippet:

(setq nnimap-authinfo-file
        (nnheader-concat gnus-home-directory "authinfo.gpg")
      smtpmail-auth-credentials
        (nnheader-concat gnus-home-directory "authinfo.gpg")
      smtpmail-starttls-credentials
        (nnheader-concat gnus-home-directory "authinfo.gpg"))

But this setting does not work.
-- 
horizon

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

* Re: how to set gnus authinfo file
  2016-06-12  6:12 how to set gnus authinfo file Alice Bob
@ 2016-06-12  9:58 ` Martin
       [not found] ` <mailman.1360.1465725527.1216.info-gnus-english@gnu.org>
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 15+ messages in thread
From: Martin @ 2016-06-12  9:58 UTC (permalink / raw)
  To: info-gnus-english



  Alice Bob writes:

  > Emacs 24.5; Gnus 5.13.
  >
  > I would like to set file path of `~/.authinfo.gpg' which stores nntp,
  > nnimap, smtp passwords. This is the code snippet:
  >
  > (setq nnimap-authinfo-file
  >         (nnheader-concat gnus-home-directory "authinfo.gpg")
..................................................^ ?
  >       smtpmail-auth-credentials
  >         (nnheader-concat gnus-home-directory "authinfo.gpg")
..................................................^ ?
  >       smtpmail-starttls-credentials
  >         (nnheader-concat gnus-home-directory "authinfo.gpg"))
..................................................^ ?
  >
  > But this setting does not work.

Hi,

in my case just .authinfo.gpg in the home directory makes gnus ask for
the passphrase to decrypt .authinfo.gpg. No seperate configuration
needed.

Martin



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

* Re: how to set gnus authinfo file
       [not found] ` <mailman.1360.1465725527.1216.info-gnus-english@gnu.org>
@ 2016-06-12 12:07   ` Alice Bob
  2016-06-12 13:47     ` Emanuel Berg
       [not found]     ` <mailman.1372.1465739295.1216.info-gnus-english@gnu.org>
  0 siblings, 2 replies; 15+ messages in thread
From: Alice Bob @ 2016-06-12 12:07 UTC (permalink / raw)
  To: info-gnus-english

Martin <parozusa@web.de> writes:

>   Alice Bob writes:
>
>   > Emacs 24.5; Gnus 5.13.
>   >
>   > I would like to set file path of `~/.authinfo.gpg' which stores nntp,
>   > nnimap, smtp passwords. This is the code snippet:
>   >
>   > (setq nnimap-authinfo-file
>   >         (nnheader-concat gnus-home-directory "authinfo.gpg")
> ..................................................^ ?
>   >       smtpmail-auth-credentials
>   >         (nnheader-concat gnus-home-directory "authinfo.gpg")
> ..................................................^ ?
>   >       smtpmail-starttls-credentials
>   >         (nnheader-concat gnus-home-directory "authinfo.gpg"))
> ..................................................^ ?
>   >
>   > But this setting does not work.
>
> Hi,
>
> in my case just .authinfo.gpg in the home directory makes gnus ask for
> the passphrase to decrypt .authinfo.gpg. No seperate configuration
> needed.
>
Hi Martin,

I would like to change the default location of .authinfo.gpg
file. For example, put it under ~/.emacs.d/gnus/.authinfo.gpg

I cannot find a way to do this.

-- 
horizon

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

* Re: how to set gnus authinfo file
  2016-06-12  6:12 how to set gnus authinfo file Alice Bob
  2016-06-12  9:58 ` Martin
       [not found] ` <mailman.1360.1465725527.1216.info-gnus-english@gnu.org>
@ 2016-06-12 12:20 ` Adam Sjøgren
  2016-06-12 12:32   ` Adam Sjøgren
  2016-06-13  2:15   ` Eric Abrahamsen
       [not found] ` <mailman.1366.1465734069.1216.info-gnus-english@gnu.org>
  3 siblings, 2 replies; 15+ messages in thread
From: Adam Sjøgren @ 2016-06-12 12:20 UTC (permalink / raw)
  To: info-gnus-english

You didn't say what version of Gnus / Emacs you use, so your milage may
vary. Anyway:

Alice writes:

> (setq nnimap-authinfo-file

Where did you get this variable name? As far as I can see, it is nowhere
in the Gnus source code.

>       smtpmail-auth-credentials
>       smtpmail-starttls-credentials

Where did you find these variable names? I can't see them in
smptmail.el.

To me it looks like auth-sources is the variable to look at:

,----[ C-h v auth-sources RET ]
| auth-sources is a variable defined in `auth-source.el'.
| Its value is ("~/.authinfo" "~/.authinfo.gpg" "~/.netrc")
| 
| Documentation:
| List of authentication sources.
| Each entry is the authentication type with optional properties.
| Entries are tried in the order in which they appear.
| See Info node `(auth)Help for users' for details.
| 
| If an entry names a file with the ".gpg" extension and you have
| EPA/EPG set up, the file will be encrypted and decrypted
| automatically.  See Info node `(epa)Encrypting/decrypting gpg files'
| for details.
| 
| It's best to customize this with `M-x customize-variable' because the choices
| can get pretty complex.
| 
| You can customize this variable.
| 
| This variable was introduced, or its default value was changed, in
| version 24.1 of Emacs.
`----

Have you tried changing that?


  Best regards,

    Adam


-- 
 "No more than that, but very powerful all the same;          Adam Sjøgren
  simple things are good."                               asjo@koldfront.dk


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: how to set gnus authinfo file
  2016-06-12 12:20 ` Adam Sjøgren
@ 2016-06-12 12:32   ` Adam Sjøgren
  2016-06-13  2:15   ` Eric Abrahamsen
  1 sibling, 0 replies; 15+ messages in thread
From: Adam Sjøgren @ 2016-06-12 12:32 UTC (permalink / raw)
  To: info-gnus-english

Adam writes:

> You didn't say what version of Gnus / Emacs you use, so your milage may
> vary. Anyway:

You did, I just can't read. Sorry about that. I think my answer is spot
on then:

> To me it looks like auth-sources is the variable to look at:


Sorry again for not reading the very first line of your post.


  Best regards,

    Adam

-- 
 "It's not denial. I'm just very selective about the          Adam Sjøgren
  reality I accept."                                     asjo@koldfront.dk


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: how to set gnus authinfo file
  2016-06-12 12:07   ` Alice Bob
@ 2016-06-12 13:47     ` Emanuel Berg
       [not found]     ` <mailman.1372.1465739295.1216.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 15+ messages in thread
From: Emanuel Berg @ 2016-06-12 13:47 UTC (permalink / raw)
  To: info-gnus-english

Alice Bob <alicebob@riseup.net> writes:

> I would like to change the default location
> of .authinfo.gpg file. For example, put it
> under ~/.emacs.d/gnus/.authinfo.gpg
>
> I cannot find a way to do this.

Try

    M-x apropos-value RET authinfo RET

It seems `auth-sources' is what you seek.

From the help: "Entries are tried in the order
in which they appear."

But - why move it from the home dir? What is
the gain in that?

-- 
underground experts united .... http://user.it.uu.se/~embe8573
Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic
                   - so far: 48 Blogomatic articles -                   



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

* Re: how to set gnus authinfo file
  2016-06-12 12:20 ` Adam Sjøgren
  2016-06-12 12:32   ` Adam Sjøgren
@ 2016-06-13  2:15   ` Eric Abrahamsen
  1 sibling, 0 replies; 15+ messages in thread
From: Eric Abrahamsen @ 2016-06-13  2:15 UTC (permalink / raw)
  To: info-gnus-english

asjo@koldfront.dk (Adam Sjøgren) writes:

> You didn't say what version of Gnus / Emacs you use, so your milage may
> vary. Anyway:
>
> Alice writes:
>
>> (setq nnimap-authinfo-file
>
> Where did you get this variable name? As far as I can see, it is nowhere
> in the Gnus source code.

There is a nntp-authinfo-file, though. I still think you're right that
setting auth-sources is the way to go, but there is also this.

E


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: how to set gnus authinfo file
       [not found]     ` <mailman.1372.1465739295.1216.info-gnus-english@gnu.org>
@ 2016-07-03 11:17       ` Alice Bob
  2016-07-03 12:03         ` Adam Sjøgren
       [not found]         ` <mailman.463.1467547410.26859.info-gnus-english@gnu.org>
  0 siblings, 2 replies; 15+ messages in thread
From: Alice Bob @ 2016-07-03 11:17 UTC (permalink / raw)
  To: info-gnus-english

Emanuel Berg <embe8573@student.uu.se> writes:

> Alice Bob <alicebob@riseup.net> writes:
>
>> I would like to change the default location
>> of .authinfo.gpg file. For example, put it
>> under ~/.emacs.d/gnus/.authinfo.gpg
>>
>> I cannot find a way to do this.
>
> Try
>
>     M-x apropos-value RET authinfo RET
>
> It seems `auth-sources' is what you seek.
Yeah, I have now changed to `auth-sources' instead of `nnimap-authinfo-file'.
>
>>From the help: "Entries are tried in the order
> in which they appear."
>
> But - why move it from the home dir? What is
> the gain in that?

Ha, this is my idead: since `authinfo.gpg' is only for Gnus mail
authentication, why not put it under emacs directory? File under
home (~/.authinfo.gpg) should be used for the whole user
account. Is this reasonable?

-- 
horizon

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

* Re: how to set gnus authinfo file
       [not found] ` <mailman.1366.1465734069.1216.info-gnus-english@gnu.org>
@ 2016-07-03 11:20   ` Alice Bob
  0 siblings, 0 replies; 15+ messages in thread
From: Alice Bob @ 2016-07-03 11:20 UTC (permalink / raw)
  To: info-gnus-english

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb18030", Size: 717 bytes --]

asjo@koldfront.dk (Adam Sj0‹3gren) writes:

>> (setq nnimap-authinfo-file
>
> Where did you get this variable name? As far as I can see, it is nowhere
> in the Gnus source code.
This variable will be released in next version of Gnus.

>>       smtpmail-auth-credentials
>>       smtpmail-starttls-credentials
>
> Where did you find these variable names? I can't see them in
> smptmail.el.
There variables were used prior to Emacs 24.1 and deprecated
>
> To me it looks like auth-sources is the variable to look at:
Got it. I am using `auth-sources' now.
_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: how to set gnus authinfo file
  2016-07-03 11:17       ` Alice Bob
@ 2016-07-03 12:03         ` Adam Sjøgren
  2016-07-09  8:17           ` Tassilo Horn
       [not found]           ` <mailman.876.1468052289.26859.info-gnus-english@gnu.org>
       [not found]         ` <mailman.463.1467547410.26859.info-gnus-english@gnu.org>
  1 sibling, 2 replies; 15+ messages in thread
From: Adam Sjøgren @ 2016-07-03 12:03 UTC (permalink / raw)
  To: info-gnus-english

Alice writes:

> Ha, this is my idead: since `authinfo.gpg' is only for Gnus mail
> authentication, why not put it under emacs directory? File under
> home (~/.authinfo.gpg) should be used for the whole user
> account. Is this reasonable?

Do any other programs use ~/.authinfo.gpg?


  Best regards,

    Adam

-- 
 "It will turn into pointer equality or something             Adam Sjøgren
  ghastly like that"                                     asjo@koldfront.dk


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: how to set gnus authinfo file
       [not found]         ` <mailman.463.1467547410.26859.info-gnus-english@gnu.org>
@ 2016-07-03 12:47           ` Alice Bob
  2016-07-25 20:44             ` Bill White
  0 siblings, 1 reply; 15+ messages in thread
From: Alice Bob @ 2016-07-03 12:47 UTC (permalink / raw)
  To: info-gnus-english

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb18030", Size: 588 bytes --]

asjo@koldfront.dk (Adam Sj0‹3gren) writes:

> Alice writes:
>
>> Ha, this is my idead: since `authinfo.gpg' is only for Gnus mail
>> authentication, why not put it under emacs directory? File under
>> home (~/.authinfo.gpg) should be used for the whole user
>> account. Is this reasonable?
>
> Do any other programs use ~/.authinfo.gpg?
I am not sure yet. AFAIS, only Emacs/Gnus use ~/.authinfo.gpg (by default).
-- 
horizon
_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: how to set gnus authinfo file
  2016-07-03 12:03         ` Adam Sjøgren
@ 2016-07-09  8:17           ` Tassilo Horn
       [not found]           ` <mailman.876.1468052289.26859.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 15+ messages in thread
From: Tassilo Horn @ 2016-07-09  8:17 UTC (permalink / raw)
  To: info-gnus-english

asjo@koldfront.dk (Adam Sjøgren) writes:

>> Ha, this is my idead: since `authinfo.gpg' is only for Gnus mail
>> authentication, why not put it under emacs directory? File under
>> home (~/.authinfo.gpg) should be used for the whole user
>> account. Is this reasonable?
>
> Do any other programs use ~/.authinfo.gpg?

I think so.

,----[ (info "(auth)Overview") ]
| The auth-source library is simply a way for Emacs and Gnus, among
|                                                             ^^^^^
| others, to answer the old burning question “What are my user name and
| ^^^^^^
| password?”
`----

And looking at my ~/.authinfo.gpg, I have at least two entries which are
not mail servers although I cannot remember why I've put them there.
One of them is the old Gnus git repository, so maybe Magit/VC are able
to read credentials there when pushing?

Bye,
Tassilo


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: how to set gnus authinfo file
       [not found]           ` <mailman.876.1468052289.26859.info-gnus-english@gnu.org>
@ 2016-07-11 15:18             ` Ted Zlatanov
  0 siblings, 0 replies; 15+ messages in thread
From: Ted Zlatanov @ 2016-07-11 15:18 UTC (permalink / raw)
  To: info-gnus-english

On Sat, 09 Jul 2016 10:17:50 +0200 Tassilo Horn <tsdh@gnu.org> wrote: 

TH> asjo@koldfront.dk (Adam Sjøgren) writes:
>>> Ha, this is my idead: since `authinfo.gpg' is only for Gnus mail
>>> authentication, why not put it under emacs directory? File under
>>> home (~/.authinfo.gpg) should be used for the whole user
>>> account. Is this reasonable?
>> 
>> Do any other programs use ~/.authinfo.gpg?

TH> I think so.

TH> ,----[ (info "(auth)Overview") ]
TH> | The auth-source library is simply a way for Emacs and Gnus, among
TH> |                                                             ^^^^^
TH> | others, to answer the old burning question “What are my user name and
TH> | ^^^^^^
TH> | password?”
TH> `----

TH> And looking at my ~/.authinfo.gpg, I have at least two entries which are
TH> not mail servers although I cannot remember why I've put them there.
TH> One of them is the old Gnus git repository, so maybe Magit/VC are able
TH> to read credentials there when pushing?

Outside Emacs, I wrote a credentials plugin for Git that uses it:
https://git.kernel.org/cgit/git/git.git/tree/contrib/credential/netrc

Ted

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: how to set gnus authinfo file
  2016-07-03 12:47           ` Alice Bob
@ 2016-07-25 20:44             ` Bill White
  2016-07-26  8:26               ` Adam Sjøgren
  0 siblings, 1 reply; 15+ messages in thread
From: Bill White @ 2016-07-25 20:44 UTC (permalink / raw)
  To: info-gnus-english

On Sun Jul 03 2016 at 07:47, Alice Bob <alicebob@riseup.net> wrote:

> asjo@koldfront.dk (Adam Sjøgren) writes:
>
>> Alice writes:
>>
>>> Ha, this is my idead: since `authinfo.gpg' is only for Gnus mail
>>> authentication, why not put it under emacs directory? File under
>>> home (~/.authinfo.gpg) should be used for the whole user
>>> account. Is this reasonable?
>>
>> Do any other programs use ~/.authinfo.gpg?

> I am not sure yet. AFAIS, only Emacs/Gnus use ~/.authinfo.gpg (by default).

tramp and org-jira do.  if i use one of them first thing in a fresh
emacs, i'm prompted to decrypt ~/.authinfo.gpg.  and i recently wrote a
mathematica shell script that had to access an internal web server with
authentication, so i wrote a little authinfo parser for it to avoid
storing my password in the code.

cheers -

bw
bill white . billw@wolfram.com
"no ma'am, we're musicians."


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: how to set gnus authinfo file
  2016-07-25 20:44             ` Bill White
@ 2016-07-26  8:26               ` Adam Sjøgren
  0 siblings, 0 replies; 15+ messages in thread
From: Adam Sjøgren @ 2016-07-26  8:26 UTC (permalink / raw)
  To: info-gnus-english

Bill writes:

> On Sun Jul 03 2016 at 07:47, Alice Bob <alicebob@riseup.net> wrote:

>> asjo@koldfront.dk (Adam Sjøgren) writes:

>>> Do any other programs use ~/.authinfo.gpg?

>> I am not sure yet. AFAIS, only Emacs/Gnus use ~/.authinfo.gpg (by default).

> tramp and org-jira do.  if i use one of them first thing in a fresh
> emacs, i'm prompted to decrypt ~/.authinfo.gpg.  and i recently wrote a
> mathematica shell script that had to access an internal web server with
> authentication, so i wrote a little authinfo parser for it to avoid
> storing my password in the code.

Cool that more and more programs use it!

This is one of the times that I am unequivocally happy to be wrong, and
corrected.


  Thanks!

    /A

-- 
 "This is not going exactly as planned."                      Adam Sjøgren
                                                         asjo@koldfront.dk


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

end of thread, other threads:[~2016-07-26  8:26 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-12  6:12 how to set gnus authinfo file Alice Bob
2016-06-12  9:58 ` Martin
     [not found] ` <mailman.1360.1465725527.1216.info-gnus-english@gnu.org>
2016-06-12 12:07   ` Alice Bob
2016-06-12 13:47     ` Emanuel Berg
     [not found]     ` <mailman.1372.1465739295.1216.info-gnus-english@gnu.org>
2016-07-03 11:17       ` Alice Bob
2016-07-03 12:03         ` Adam Sjøgren
2016-07-09  8:17           ` Tassilo Horn
     [not found]           ` <mailman.876.1468052289.26859.info-gnus-english@gnu.org>
2016-07-11 15:18             ` Ted Zlatanov
     [not found]         ` <mailman.463.1467547410.26859.info-gnus-english@gnu.org>
2016-07-03 12:47           ` Alice Bob
2016-07-25 20:44             ` Bill White
2016-07-26  8:26               ` Adam Sjøgren
2016-06-12 12:20 ` Adam Sjøgren
2016-06-12 12:32   ` Adam Sjøgren
2016-06-13  2:15   ` Eric Abrahamsen
     [not found] ` <mailman.1366.1465734069.1216.info-gnus-english@gnu.org>
2016-07-03 11:20   ` Alice Bob

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 NNTP newsgroup(s).