git
大约 1 分钟
github 推送失败 fatal: User canceled device code authentication remote: Support for password authentication was removed on August 13, 2021
推送本地仓库到github,输入账号密码,失败

经过百度得知:是因为自从 21 年 8 月 13 后不再支持用户名密码的方式验证了,需要创建个人访问令牌(personal access token)。 解决办法如下: 在 github 上生成令牌,应用于所需的仓库中
登录
github点击右上角头像下的settings按钮,点击左侧Developer settings按钮
image-20230427175314080 点击
Personal access tokens下的Tokens(classic)按钮,之后点击右侧的Generate new token下的Generate new token (classic)按钮
image-20230427180301036 Note 自己填写,
Expiration建议选择No expiration永久不过期 ,但是会有风险,下面所有的都勾选
image-20230427180227808 点击
Generate token按钮生成token
image-20230427180514066 生成之后再次推送,选取
token方法登录 输入刚刚生成的token