github-to-bitbucket-issues-migration icon indicating copy to clipboard operation
github-to-bitbucket-issues-migration copied to clipboard

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

Open silviubogan opened this issue 7 years ago • 1 comments

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.

silviubogan avatar Aug 25 '17 17:08 silviubogan

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.

nicolaiskogheim avatar Jun 04 '18 15:06 nicolaiskogheim