Github create token with 2 factor authentication

I am trying to get a authorize a user and get a token back. The user has 2 factor authentication on.

This is the code I am tring to use. It will not accept the code I get via SMS. This works if the user does not have 2fa enabled.

  • Anyone implemented google identity toolkit succefully in PHP?
  • How to use the API to download a repo
  • Fetch Github Issue informatiom from Issue ID
  • Checking if a repo is starred with GitHub API
  • How to create a new source code branch using TFS API?
  • Configuring GitHub hooks to call an end-point that is OAuth protected
  • curl -i -u $user -H "X-GitHub-OTP: $code" \
         -d '{"scopes": [ "repo" ], "note": "program"}' \
         https://api.github.com/authorizations
    

    http://developer.github.com/v3/auth/#working-with-two-factor-authentication
    http://developer.github.com/v3/oauth/#create-a-new-authorization

  • How to avoid developers to commit without mention the issue on commit message on Github
  • How can I re-merge commits that were reverted in github?
  • Git client throwing error
  • Version numbering / release mechanics with Maven and GitHub
  • Getting all versions of a file using GitHub blob api
  • Git: split pull request into smaller PR's based upon the new directories in the pull request
  • One Solution collect form web for “Github create token with 2 factor authentication”

    This actually works. I was having problems with the SMS codes expiring.

    Git Baby is a git and github fan, let's start git clone.