🖥
Github API | 二段階認証を設定しているアカウントから利用する
二段階認証を設定していると、正しいパスワードを入力しても認証が出来ない。
curl -u YumaInaura https://api.github.com
$ curl -u YumaInaura https://api.github.com
Enter host password for user 'YumaInaura':
{
"message": "Must specify two-factor authentication OTP code.",
"documentation_url": "https://developer.github.com/v3/auth#working-with-two-factor-authentication"
}
トークン作成
https://github.com/settings/tokens からトークンを作ってしまうのが早そう。
再実行
curl -u YumaInaura:[発行されたトークン] https://api.github.com
結果
応答あり。
参考
チャットメンバー募集
何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。
公開日時
2017-05-15
Discussion