Git报Authentication failed

1、git时报Authentication failed

这里写图片描述

解决方案:
1)进入C:\Users\yaowanjun.ssh下,生成git ssh密钥:ssh-keygen -t rsa -C“邮箱”
Git报Authentication failed_第1张图片
2)将C:\Users\yaowanjun.ssh下的id_rsa.pub内容全部复制
Git报Authentication failed_第2张图片
3)头像—-Settings—-SSH Keys,粘贴复制的id_rsa.pub全部内容至key,点击Add key
Git报Authentication failed_第3张图片
4)再次git clone“SSH地址”
Are you sure you want to continue connecting (yes/no)? #确定是否继续联系,输入yes
Enter passphrase (empty for no passphrase): #输入密码

Git报Authentication failed_第4张图片

你可能感兴趣的:(Git)