Skip to content

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

@silviubogan

Description

@silviubogan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions