解决git账号密码验证问题:Please use a personal access token instead
1.发现Git拉代码用账号密码报错,错误如下
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/877762536/meiyuan_new.git/'
原因是git弃用了git账号密码验证,改用token或SSH秘钥验证
2.创建token
1.登陆github,找到settings
2.配置access token
Developer settings->Personal access tokens->Generate new token
Note:名字可以自己定义
Expiration:过期时间,可以按自己的需求设置
Select scopes:如果是个人使用的话可以全选
3.使用token
填写password的时候,输入2.2生成的token就行
$ git clone https://github.com/username/repo.git
Username: your_username
Password: your_token