Github create token with 2 factor authentication

我与影子孤独终老i 提交于 2020-01-12 09:58:08

问题


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.

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


回答1:


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



来源:https://stackoverflow.com/questions/20065691/github-create-token-with-2-factor-authentication

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!