remote Support for password authentication was removed on August 13, 2021.

remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
问题原因

Logon failed, use ctrl+c to cancel basic credential prompt.
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: Authentication failed for 'https://github.com/dream-code-kangli/online-learning.git/'
1
2
3
4
意思是自从 21 年 8 月 13 后不再支持用户名密码的方式验证了,需要创建个人访问令牌(personal access token)。

解决方法

在 GitHub 上生成令牌,应用于所需的仓库中

点击 settings


点击右侧的 Developer settings


点击 Personal access tokens(个人访问令牌)


点击 Generate new token


设置 token 信息


根据所需过期时间,建议设置成永远,以免麻烦,建议所有选项都选上

点击 Generate token 生成令牌

得到生成的令牌


应用令牌
将生成的令牌拷贝下来,记得保存,下次你就看不到了。

修改现有的 url

git remote set-url origin  https://<your_token>@github.com/<USERNAME>/<REPO>.git
1
将<your_token>换成你自己得到的令牌。<USERNAME>是你自己github的用户名,<REPO>是你的项目名称

换成你自己得到的令牌。是你自己github的用户名,`是你的项目名称
 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值