1

I have passwords stored in .authinfo.gpg file which I only need for Gnus. I never store passwords for machines or localhost in this .authinfo.gpg file (or in any other file).

The problem is when I use Tramp (e.g. C-x C-f, then type in su::), I constantly get prompted for password for .authinfo.gpg which I don't need.

Is it possible to disable password prompt for .authinfo.gpg when using Tramp? An alternative solution would be to use some other file for Gnus, is there a way to do this?

2

You can either use this (I base mine on the command-line arguments):

(setq tzz-gnus-running-p (member "gnus" command-line-args))
(setq auth-sources (if tzz-gnus-running-p
                       '("~/.gnus.json.gpg")
                       '("~/.authinfo.json.gpg")))

or customize tramp-completion-use-auth-sources:

tramp-completion-use-auth-sources is a variable defined in ‘tramp.el’.
Its value is t
...
Whether to use ‘auth-source-search’ for completion of user and host names.
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.