git clone时报错Permission denied (publickey,password)
在使用
git clone xxxx
时,报错,如图
1、上网查资料,说可能是SSH Key不存在
使用命令ls ~/.ssh/
,可以看到,SSH key是存在的,所以这种情况排除
2、按github官网:
1)、Ensure the ssh-agent is running:
#start the ssh-agent in the background
$ eval $(ssh-agent -s)
> Agent pid 59566
2)、Add your SSH private key to the ssh-agent
$ ssh-add ~/.ssh/id_rsa
3)、添加ssh key到github
复制
文件中的内容,粘贴保存。
4)、测试连接
ssh -vT git@github.com
,显示成功。
还没有评论,来说两句吧...