解决github推送错误 remote: Support for password authentication was removed on August 13, 2021.
推送github仓库代码,输入完账号密码出现:
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.
是因为自从 21 年 8 月 13 后不再支持用户名密码的方式验证了,需要创建个人访问令牌(personal access token)。
解决办法如下:
在 GitHub 上生成令牌,应用于所需的仓库中
1.点击 settings
2.点击右侧的 Developer settings
3.点击 Personal access tokens(个人访问令牌)
4.点击 Generate new token
5.设置 token 信息
6.根据所需过期时间,建议设置成永远,以免麻烦,建议所有选项都选上
7.点击 Generate token 生成令牌
8.得到生成的令牌
9.应用令牌
10.修改现有的 url
git remote set-url origin https://<your_token>@github.com/<USERNAME>/<REPO>.git
将<your_token>换成你自己得到的令牌。<USERNAME>是你自己github的用户名,<REPO>是你的项目名称
换成你自己得到的令牌。是你自己github的用户名,`是你的项目名称
然后再次执行 pull push 操作
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了