我是在 clone 的时候出现的错误,报错信息如下
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: Authentication failed for 'https://github.com/xxx.git/'
注意审题:意思是使用密码登录这种方式已经在2021年8月13日失效了需要在 github 上生成token登录令牌替换掉密码来进行登录
至于如何生成这个token这个大家可以自行查询一下,今天时间有限就不讲了,等抽出时间之后再补充(可以先参考 这个链接 https://blog.youkuaiyun.com/weixin_41010198/article/details/119698015),现在只讲拿到token之后怎么操作
报错这个token因为可能以后重新clone新项目的时候还会遇到这种问题
搜索的答案无非就是这样:
解决方案,重新执行git config命令配置用户名和邮箱即可:
git config --global user.name