栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

remote: Support for password authentication was removed on August 13, 2021. Please use a personal ac

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

remote: Support for password authentication was removed on August 13, 2021. Please use a personal ac

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/aaromthon/wanda.git/'

解决办法:

进入git bash界面然后:
一、git config --global --list 验证邮箱与GitHub注册时输入的是否一致,如下:

$ git config --global --list
user.email=14392***@qq.com
user.name=14392***@qq.com
http.sslverify=false

二、设置全局用户名和邮箱,如下:

$ git config --global user.name "username"
$ git config --global user.email "14392***@qq.com"

三、ssh-keygen -t rsa -C “这里换上你的邮箱”,一路回车,在出现选择时输入Y,再一路回车直到生成密钥。会在/Users路径下生成一个.ssh文件夹,密钥就存储在其中,如下:

$ ssh-keygen -t rsa -C "14392***@qq.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/Lenovo/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/Lenovo/.ssh/id_rsa
Your public key has been saved in /c/Users/Lenovo/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:cmghkaLRiF50CP*************** 14392***@qq.com
The key's randomart image is:
+---[RSA 3072]----+
|.**=*******o.    |
|=o+****Xo...     |
|+oEBEo=.          |
|.=+.o= o         |
|.. .+ A S        |
|  .. o =         |
|      .          |
|                 |
|                 |
+----[SHA256]-----+

四、复制 /c/Users/Lenovo/.ssh/id_rsa.pub 里面的内容到到git仓库,添加秘钥,如下:

 

 

 

 五、ssh -T git@github.com 测试一下通不通,通了显示如下:

$ ssh -T git@github.com
Hi aaro***! You've successfully authenticated, but GitHub does not provide shell access.

即可正常使用。
如果不通如下两步操作即可:

$ ssh-agent -s
$ ssh-add ~/.ssh/id_rsa

结束!

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/422924.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号