玛卡巴卡的卡巴卡玛 发表于 2024-10-22 01:14:51

git remote Support for password authentication was removed on August 1

一 问题描述

git push 上报时提示
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
原因是:github 从2021年8月13日开始就不能用了,必须使用个人访问令牌(personal access token),需要把你的密码替换成token!
二 办理办法

1.去github 个人右侧界面,选择Settings
https://i-blog.csdnimg.cn/blog_migrate/ff8102660957e4c85cfd23cfee2f80cb.png
2.点击右侧的 Developer settings
https://i-blog.csdnimg.cn/blog_migrate/ac8d07f44f61d3b71dcf41ec6fd69029.png
3.选择Personal access tokens
https://i-blog.csdnimg.cn/blog_migrate/bf466aeb4f2396e2ded92fd24f805b76.png
4.Generate new token
https://i-blog.csdnimg.cn/blog_migrate/8c5deda05388421b27974c378d6768d7.png
5.设置token 选项内容
设置一个名字,选择逾期时间
https://i-blog.csdnimg.cn/blog_migrate/ce43e158741923cb2529107f12a43c64.png
下面选项内容发起全选,防止之后出现莫名其秒问题
https://i-blog.csdnimg.cn/blog_migrate/d3f1dd48544f3237d630efa41540d65c.png
8 产生密钥
点击上面“Generate token” 之后,得下面图片位置的token 内容,生存起来制止忘记
https://i-blog.csdnimg.cn/blog_migrate/72f8785a8b0a730f2837aff43298a81c.png
三 执行push

在git init,git commit, git add remote 执行之后
修改现有的url
git remote set-url originhttps://<your_token>@github.com/<USERNAME>/<REPO>.git

将<your_token>换成你自己得到的令牌。是你自己github的用户名,是你的项目名称
换成你自己得到的令牌。是你自己github的用户名,`是你的项目名称
然后再次执行 pull push 操作,大功告成。
如果之后出现失败,大概率是你的token逾期了,需要重新生成
本日的问题就记录到这里。欢迎关注我的公众号,得到更多内容。
https://i-blog.csdnimg.cn/blog_migrate/cea26438c8a6115471001d46ce70a567.jpeg

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页: [1]
查看完整版本: git remote Support for password authentication was removed on August 1