Token authentication requirements for Github operation Please use a personal access token instead

在这里插入图片描述

问题描述

Github clone 代码时候提示 remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.

git clone https://github.com/XuTingSummer/tingsummer.git
正克隆到 'tingsummer'...
Username for 'https://github.com': xutingsummer@163.com
Password for 'https://xutingsummer@163.com@github.com': 
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: 'https://github.com/XuTingSummer/tingsummer.git/' 鉴权失败

原因分析:

Beginning August 13, 2021, we will no longer accept account passwords when authenticating Git operations and will require the use of token-based authentication, such as a personal access token (for developers) or an OAuth or GitHub App installation token (for integrators) for all authenticated Git operations on GitHub.com. You may also continue using SSH keys where you prefer.

参考链接:Token authentication requirements for Git operations

换句话说就是使用Token来代替密码 进行身份验证


解决方案:

Github > 个人设置 > Settings > Developer setttings > Personal access tokens > Generate new token > 根据需要勾选权限 > Generate token > 复制生成的token > 回到命令行在提示输入密码的时候输入复制好的Token

  • 个人设置 > Settings
    在这里插入图片描述
  • Developer setttings
    在这里插入图片描述
  • Personal access tokens > Generate new token在这里插入图片描述
  • 根据需要勾选权限(个人的话全勾上就好了) > Generate token > 复制生成的token
    在这里插入图片描述
  • 回到命令行在提示输入密码的时候输入复制好的Token
git clone https://github.com/XuTingSummer/tingsummer.git                                                   
正克隆到 'tingsummer'...
Username for 'https://github.com': xutingsummer@163.com
Password for 'https://xutingsummer@163.com@github.com': #输入复制的token
remote: Enumerating objects: 4, done.
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 4 (delta 0), reused 0 (delta 0), pack-reused 0
接收对象中: 100% (4/4), 完成.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值