标签:
最近enable了github的2FA,这里有相关的介绍。
但是enable了之后,访问github出现如下错误:
remote: Invalid username or password. fatal: Authentication failed for xxx
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