Github Support for password auth

2024-08-21  本文已影响0人  流年划过颜夕
remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.

遇见删除Github对密码身份验证的支持报错后,解决方案如下

1.前往https://github.com/settings/tokens
2.点击Generate new token - Generate new token
3.在页面中Expiration*选择No Expiration,其他地方选项按需选择-点击Generate token
4.复制该秘钥

QQ_1724310188505.png
5.回到终端,继续之前造成该报错的操作,如git clone xxx,会出现下面内容,按注释填写
//github 用户名
Username for 'https://github.com':
//不要输入github的密码,而是直接粘贴刚才第4步的秘钥
Password for 'https://liunianhuaguoyanxi@github.com':
上一篇下一篇

猜你喜欢

热点阅读