当前位置: 代码迷 >> 综合 >> Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for
  详细解决方案

Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for

热度:16   发布时间:2023-11-22 17:07:45.0

问题

Cloning into 'xxx'...
Username for 'https://github.com': xx.xx@qq.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: Authentication failed for 'https://github.com/xx/xx.git/'

在这里插入图片描述

解决方法

本地生成私钥

ssh-keygen -t rsa -C "xx.xx@qq.com"

xx.xx@qq.com表示自己的github邮箱
执行该后一直输入回车就可以了

在github中增加私钥

在github中点击设置

在这里插入图片描述

点击SSH and GPG Keys

在这里插入图片描述

New SSH Keys

在这里插入图片描述

私钥位置

一般在C:\Users\admin.ssh下面,有一个id_rsa.pub文件,将id_rsa.pub文件中的内容全部输入到key中
在这里插入图片描述

然后选择对应的项目选择ssh方式

在这里插入图片描述

成功截图

在这里插入图片描述

admin@????? MINGW64 /e/study_java $ git clone git@github.com:xxx/xxx.git Cloning into 'xxx'... The authenticity of host 'github.com (20.205.243.166)' can't be established. ECDSA key fingerprint is SHA256:xxxxx/xx/LiyKgUfQM. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'github.com,20.205.243.166' (ECDSA) to the list of known hosts. remote: Enumerating objects: 323, done. remote: Counting objects: 100% (323/323), done. remote: Compressing objects: 100% (177/177), done. remote: Total 323 (delta 140), reused 277 (delta 96), pack-reused 0 Receiving objects: 100% (323/323), 68.64 KiB | 23.00 KiB/s, done. Resolving deltas: 100% (140/140), done.

学习java群

java交流群:868794080

  相关解决方案