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 ...
文章共340字 · 阅读需要大约2分钟
一键AI生成摘要,助你高效阅读
问答
·
在使用
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
,显示成功。
3、重新git clone xxx
,成功执行
总结: 重新添加了ssh key就成功了。
更多推荐
已为社区贡献2条内容
所有评论(0)