这是我参与「第三届青训营 -后端场」笔记创作活动的的第x篇笔记。
Github 授权问题
push本地仓库到远程时出了下面的问题,还是头一次碰到,不太清楚为什么。
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.
记录中的网址是Git操作的令牌认证要求/Token authentication requirements for Git operations 里面介绍了在Github账户中申请令牌的操作。
用令牌替换旧密码
虽然令牌申请成功了,但是不能采用命令行输入用户名和令牌的方式登录,即不能用令牌替代密码,暂时不太清楚为什么上面网址中介绍的方式不能正常授权。下面是采用git的操作重新缓存认证信息
通过命令行,您可以直接使用删除凭据
git credential-manager uninstall
在Git中缓存GitHub凭据
$ git config --global credential.helper wincred