ubuntu 解决git clone时出现fatal: Could not read from remote repository.
问题如下:
Permission denied (publickey).
fatal: Could not read from remote repository.
解决方案:
1.生成SSH Key,一路回车即可。使用自己注册github的邮箱
ssh-keygen -t rsa -C “your_email@example.com”
2.查看文件是否生成。
cd ~/.ssh
ls
3.生成私钥
ssh-add id_rsa
4.登录自己的github帐号,在用户->setting->ssh and gpg keys->new SSH Key中将id_rsa.pub内容复制粘贴,title随便取一个,点击add即可。 跳转github
如图所示: