paradox icon indicating copy to clipboard operation
paradox copied to clipboard

Store token in ~/.authinfo.gpg

Open dakra opened this issue 8 years ago • 4 comments

This would let you store your password alongside your other passwords ;)

You can easily receive them from elisp with auth-source-user-and-password.

I guess many people even already have a github token for ghub there so they could just re-use that.

dakra avatar Oct 29 '17 12:10 dakra

this. came here just for this.

a-schaefers avatar Jul 31 '18 18:07 a-schaefers

Got it with the hint of @dakra we can use e.g,

(setq paradox-github-token (cadr(auth-source-user-and-password "api.github.com" "a-schaefers^paradox")))

and placed in ~/.authinfo or ~/.authinfo.gpg would be an entry in format of,

machine api.github.com login a-schaefers^paradox password aj809cjf430ifj034jf304fij (fake api credential -------------------------------------------------------^^^^^^^^^^^^^^^^^^^^)

cheers

a-schaefers avatar Jul 31 '18 19:07 a-schaefers

Is this format same as in the ~/.netrc file?

hjpotter92 avatar Oct 28 '18 10:10 hjpotter92

@hjpotter92 https://www.masteringemacs.org/article/keeping-secrets-in-emacs-gnupg-auth-sources mentions that Emacs' auth-source lib works with .netrc files, though it's not clear whether that's because it uses the same format or auth-source knows how to read two different formats.

sandinmyjoints avatar May 14 '19 20:05 sandinmyjoints