Skip to content

gist.el doesn't work with 2 factor Auth #113

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

Open
jjasghar opened this issue Apr 5, 2018 · 3 comments
Open

gist.el doesn't work with 2 factor Auth #113

jjasghar opened this issue Apr 5, 2018 · 3 comments

Comments

@jjasghar
Copy link

jjasghar commented Apr 5, 2018

One of my organizations forced 2 factor Auth on me, and now trying to run M-x gist-buffer-private I get this:

Contacting host: api.github.com:443
Opening TLS connection to ‘api.github.com’...
Opening TLS connection with ‘gnutls-cli --x509cafile nil -p 443 api.github.com’...failed
Opening TLS connection with ‘gnutls-cli --x509cafile nil -p 443 api.github.com --protocols ssl3’...failed
Opening TLS connection with ‘openssl s_client -connect api.github.com:443 -no_ssl2 -ign_eof’...done
Opening TLS connection to ‘api.github.com’...done
Decrypting /Users/jjasghar/.authinfo.gpg...done
json-read: JSON readtable error

I'm not sure how to debug this farther, but this is the only change that has happened between Github and my Emacs installation recently.

@zzamboni
Copy link

zzamboni commented Apr 13, 2018

I was able to use gist.el with 2FA enabled by creating a Personal Access Token with "gist" scope, and using it instead of my password, and also when gist.el asks for your "OAuth Token".

Documentation on how to create the token: https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/

You may need to remove the [github] section from your ~/.gitconfig file, and restart Emacs so that gist.el asks for your information again.

@chrismoos
Copy link

@jjasghar I ran into what looked like a similar issue, but it turned out to be an issue with the openssl binary on my machine not supporting TLSv1.2 (GitHub doesn't support old TLS protocols anymore).

If you have a Mac, make sure you have the latest openssl installed via Homebrew (brew upgrade openssl) and get the binary on your path:

ln -s /usr/local/opt/openssl/bin/openssl /usr/local/bin/openssl

Then exit emacs, open a new terminal, and try again.

@nickanderson
Copy link

I was able to use gist.el with 2FA enabled by creating a Personal Access Token with "gist" scope, and using it instead of my password, and also when gist.el asks for your "OAuth Token".

Documentation on how to create the token: https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/

You may need to remove the [github] section from your ~/.gitconfig file, and restart Emacs so that gist.el asks for your information again.

Yeah, it's disappointing that I can't seem to leverage authinfo which can be gpg encrypted and where I store other credentials used by forge and magit. I don't want to put a token into my .gitconfig which is plain text.

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

4 participants