码云生成公钥和私钥
2020-03-26 本文已影响0人
熙航君
在git安装完成以后,在桌面右键选择git bash进入命令行,输入ssh-keygen -t rsa -C "自己的邮箱"

输入cat ~/.ssh/id_rsa.pub命令

执行ssh-add时出现Could not open a connection to your authentication agent
解决方案:执行ssh-agent bash

如果你本地已经有 ssh-agent 服务 在服务 ssh-agent 中 把新增的 ssh-key 所在的地址添加进去,执行ssh-add ~/.ssh/id_rsa命令

然后测试一下ip 是否可以ssh访问 ssh -T git@github.com,如果访问不通可能是因为网络问题,可以切换网络试一下。


没问题的话就可以克隆代码了
