Skip to content
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

Two-factor auth breaks everything (?) #51

Closed
seubert opened this issue Jan 11, 2014 · 7 comments
Closed

Two-factor auth breaks everything (?) #51

seubert opened this issue Jan 11, 2014 · 7 comments

Comments

@seubert
Copy link

seubert commented Jan 11, 2014

I had two-factor auth on after installing gist.el via packages. After it prompted me for my GitHub password it would prompt again for just "Password" and only gave "JSON readtable error" even if I used my auth code.

Turning off two-factor auth allows me to login fine with only the initial GitHub password prompt.

@arthurnn
Copy link

arthurnn commented Feb 5, 2014

same issue in here =(

@arthurnn
Copy link

arthurnn commented Feb 5, 2014

So I was able to fix this locally, however not sure if is the best way to do this, anyways, as gist.el uses gh.el which persist the credentials as git --global config, we can just set them manually and everything should work, like this:
Make sure to unset them, just in case.

git config --global --unset github.user
git config --global --unset github.password
git config --global --unset github.oauth-token

Set them

git config --global --add github.user your_user_name
git config --global --add github.password your_token
git config --global --add github.oauth-token same_token_as_password

To generate the token, just go to https://github.com/settings/tokens/new

I hope this helps.

@supernullset
Copy link

Also broken here, but @arthurnn's fix did not work for me. I am now getting the error Invalid number format: 2 when I attempt a gist-list

@dylan-conlin
Copy link

@arthurnn's fix worked for me. Thanks!

@sigma
Copy link
Collaborator

sigma commented Jan 26, 2015

I introduced 2-factor support in gh.el 0.9.0, so it should now be ok without any additional hacks.
Please reopen if that's not the case

@sigma sigma closed this as completed Jan 26, 2015
@supernullset
Copy link

Thanks @sigma!

@brandoncc
Copy link

Is there any known problem with Emacs 24.5.1 on OSX? I can't get the login to work. I enter a a token as my password and oauth token and it gives me errors such as the JSON readtable error and one about api v3 something. I had it working previously, then I cleared out my elpa dir while trying to get cider working and now I can't login to gh anymore. I do have 2fa enabled, but I also tried with it disabled to no avail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants