解决remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/helloworld966/C-ContectionPool.git/'问题
问题
最近在用git push上传文件时遇到了这样的问题
就是从2021年8月13日之后不再支持用户名密码的方式验证,而是需要在GitHub上创建个人访问令牌。
解决方案
1.首先登录GitHub官网,在个人主页上点击settings
2. 找到里面的Developer settings
3. 里面会出现创建个人访问令牌,在新版本中,会有两种创建令牌的方式,选择第二个就可以。
4. 创建个人访问令牌
5. 设置token
- 得到生成令牌
- 在本地git种对自己的项目进行set-url
git remote set-url origin https://****
- 使用git pull更新
- 最后重新git push,完成项目的上传,大功告成。