正常使用过程中出现了以下问题
Warning: Permanently added the RSA host key for IP address
‘13.250.177.223’ to the list of known hosts. git@github.com:
Permission denied (publickey). fatal: Could not read from remote
repository.
搜索了一下发现是电脑添加的GitHub公钥丢失
解决方案:
-
ssh-keygen -t rsa -C “GitHub账号”
输入自己的GitHub账号然后会在user下面生成一个ssh key 我的以前生成过,GitHub上面不见了
-
在GitHub SSH and GPG 页面上添加ssh公钥
验证一下链接
ssh -T git@github.com