解决remote: Support for password authentication was removed on August 13, 2021.
2022-11-29
咱们就从github开始吧,注册就不多说了
新建项目
然后给项目起名字创建
遇到问题一:
❯ git push origin main
Username for 'https://github.com': ilovedo@126.com
Password for 'https://ilovedo@126.com@github.com':
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: 'https://github.com/lamubida/TestApp.git/' 鉴权失败
解决办法:
1.在git上生成令牌,用在仓库中
按照步骤来,保存好自己生成的令牌
2.修改现有的url
git remote set-url origin https://<your_token>@github.com/<username>/<pero>.git
<your_token>换成你自己得到的令牌
< username>是你自己github的用户名
< pero>是你的项目名称
然后再次执行 pull push 操作,大功告成。