authinfo
tags :
Introduction to Authinfo in Emacs #
ref Emacs allows you to store authentication details for various services using the auth-source library. This avoids the hassle of entering your username and password repeatedly.
Default Files and Syntax #
Emacs looks for authentication details in these files:
- `~/.authinfo`
- `~/.authinfo.gpg` (GPG)
- `~/.netrc`
The syntax for these files is similar to `netrc` files used by the FTP program. Here’s a basic example:
#+end_src machine mymachine login myloginname password mypassword port myport #+begin_src
Multiple Storage Backends #
The auth-source library supports different storage backends:
You can customize which backends to use via the `auth-sources` user option.
Saving Passwords #
When you enter a password interactively and it’s not found in your configured backends, some backends can save it for future use. This behavior is controlled by the `auth-source-save-behavior` user option.
For detailed information, refer to the official Emacs documentation on Authentication. #+end_src