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

Error: 401 - Must specify two-factor authentication OTP code #21

Open
silviubogan opened this issue Aug 25, 2017 · 1 comment
Open

Error: 401 - Must specify two-factor authentication OTP code #21

silviubogan opened this issue Aug 25, 2017 · 1 comment

Comments

@silviubogan
Copy link

silviubogan commented Aug 25, 2017

I run this command in bash:

$ ruby cli.rb -t 'personal_gh_access_token' -u 'gh_username' -p 'gh_password' -o 'export_filename.zip' -r 'gh_username/repo'

where is personal_gh_access_token created at this URL: https://github.com/settings/tokens. It is called "git: https://github.com/ on HOPE-PC at 23-oct.-2016 13:35" and it was regenerated by me today with all the available permissions enabled.

The output of the command is this (it is the same as running it with sudo):

Fetch gh_username/repo
Error fetching data from github GET https://api.github.com/repos/gh_username/repo/issues?page=1&state=open: 401 - Must specify two-factor authentication OTP code. // See: https://developer.github.com/v3/auth#working-with-two-factor-authentication

This is either a bug, or an undocumented behavior. If I disable the two-factor authentication on my GitHub account, everything works well.

@nicolaiskogheim
Copy link

I'm just guessing here, but what if it tries to authenticate with your username and password (since you provided both) and just stops because it fails? I suspect it isn't even trying you access token.

Try again, but don't specify password.

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

2 participants