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

Issue When Using Two-factor Authentication #54

Closed
alexfinnarn opened this issue Jun 24, 2019 · 4 comments
Closed

Issue When Using Two-factor Authentication #54

alexfinnarn opened this issue Jun 24, 2019 · 4 comments
Labels
bug Something isn't working

Comments

@alexfinnarn
Copy link
Contributor

alexfinnarn commented Jun 24, 2019

Describe the bug

I kept having issues providing my GitHub credentials even though I knew my username and password were correct. Then, it dawned on me that I should try to login via the web interface to see what happened. I forgot that I had 2FA set up. Once I disabled 2FA, I didn't have any issues.

I didn't go back to fully check that 2FA is always an issue, but right after I disabled it, my import process went smoothly.

As far as resolving this (if it is an issue), I think adding a note to the documentation makes sense.

To Reproduce
Steps to reproduce the behavior:

  1. Enable 2FA on your GitHub account.
  2. Try to run the npx command.
  3. See an authentication failure after entering the URL of the GitHub repository.

Screenshots

Screen Shot 2019-06-23 at 7 48 56 PM

Solution
If you use 2FA, you need to give a token instead of your password, that's just how GitHub works: https://help.github.com/en/articles/accessing-github-using-two-factor-authentication#using-two-factor-authentication-with-the-command-line

@alexfinnarn alexfinnarn added the bug Something isn't working label Jun 24, 2019
@alexfinnarn
Copy link
Contributor Author

I think if I would have given the ssh URL then I wouldn't have been prompted?

https://github.com/mathieudutour/medium-to-own-blog/blob/master/bin/medium-to-own-blog.js#L121

@mathieudutour
Copy link
Owner

possibly, it depends on your git config.

If you use 2FA, you need to give a token instead of your password, that's just how GitHub works: https://help.github.com/en/articles/accessing-github-using-two-factor-authentication#using-two-factor-authentication-with-the-command-line

@alexfinnarn
Copy link
Contributor Author

Alright. I'm not sure that this info would be helpful in documentation or on the prompts since the user's git config can vary widely, but maybe it can be worked into text for certain kinds of errors?

If not, then feel free to close the issue. Someone who is having issues authenticating will at least see the closed issue, if they do their homework.

@alexfinnarn
Copy link
Contributor Author

I made a PR along with #56 to add this to the readme under troubleshooting. Do with that what you will and if not merge in, then I think you can close the issue as I'm not sure what else to put in the codebase around this.

mathieudutour added a commit that referenced this issue Mar 15, 2020
Issues #56 and #54: Troubleshooting Info For JSX and Authentication Errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants