码迷,mamicode.com
首页 > 其他好文 > 详细

Invalid username or password with 2FA in github

时间:2015-06-03 14:02:17      阅读:154      评论:0      收藏:0      [点我收藏+]

标签:

最近enable了github的2FA,这里有相关的介绍。

但是enable了之后,访问github出现如下错误:

remote: Invalid username or password.
fatal: Authentication failed for xxx



Google之后在 这里找到了答案:

After doing some searching, it turns out that, with 2FA turned on, you no longer use your password on the command line. Instead, you need to use a personal oauth token. Generating one is super easy, but I wish I had figured this out before hand to save myself the headache of anxiously Googling!

Here are the steps to creating your personal access token:

1. Log into GitHub and access your account settings
2. Select the “Applications” tab on the left-hand navigation
3. Under “Personal Access Tokens” click “create new”
4. Enter a description for your token (so you can keep track and revoke them individually later, should you have a security breach)
5. Copy the token (40 characters long) and use that as your password on the command line.

去Github上配置好了你的Token之后,将token(40个字符的长度)拷贝下来,用这个token来代替你登录github的密码,切记不要再用你的github账号的密码,否则会出现前面的授权错误。

Invalid username or password with 2FA in github

标签:

原文地址:http://my.oschina.net/jerikc/blog/424234

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!