-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Read user and password from authinfo.gpg #2
Comments
Hi! There's nothing built into the package that makes this possible. I haven't used .authinfo much myself, since I use the same Emacs configuration on both Windows and Linux. Maybe this site can help: https://www.masteringemacs.org/article/keeping-secrets-in-emacs-gnupg-auth-sources |
Ok, figured it out with the help of https://emacs.stackexchange.com/a/8072/11825
and the following code in your Emacs config (with-eval-after-load 'random-mode
(require 'auth-source)
(let ((auth (nth 0 (auth-source-search :host "hypothes.is"
:requires '(user secret)))))
(setq hypothesis-token (funcall (plist-get auth :secret))
hypothesis-username (plist-get auth :user)))) or in Doom Emacs in (after! hypothesis
(require 'auth-source)
(let ((auth (nth 0 (auth-source-search :host "hypothes.is"
:requires '(user secret)))))
(setq hypothesis-token (funcall (plist-get auth :secret))
hypothesis-username (plist-get auth :user)))) Should this be put in the README? |
I personally don't feel like it should be in the README since storing personal information seems like a general concept, rather than something specific to this package. Also it feels a bit strange to recommend something regarding safety when I don't understand it myself. |
Hi @Kungsgeten,
is it possible to read the credentials from the
.authinfo.gpg
.I'm an Elisp noob, therefore I can't tell from the code...
Thanks for creating this! Looking forward to integrating it into my Building A Second Brain workflow 😄
The text was updated successfully, but these errors were encountered: