How to setup magithub if you have GitHub 2-factor authentication enabled?
If you are trying to set up magithub when you have 2 factor authentication enabled, here are the steps you need to take:
- Go to https://github.com/settings/tokens and create a personal token, and give it the name that the prompt suggest. For me it was: “Emacs package magithub @ francois-XPS-15-9560”, and give it the following scopes: “notification”, “repo” and “user”.
-
create a file
~/.authinfowith the following:machine api.github.com login YOUR_GITHUB_USERNAME^magithub password <your token> - encrypt the file (assumes you have GPG setup) by running:
M-x epa-encrypt-fileand give it~/.authinfo. - Make sure that
~/.authinfo.gpgwas created and that its content is right. - Delete the unencrypted
~/.authinfo - Do
M-x customize-variable RET auth-sourcesand put~/.autoinfo.gpgfirst in the list of files inspected.
Comments