github配置SSH密钥,解决git@github.com: Permission denied (publickey). Could not read from remote repository

ssh-keygen -t rsa -C "1634262961@qq.com"

 邮箱换成自己github的邮箱,中途要求输入密码,直接换行不用管

github配置SSH密钥,解决git@github.com: Permission denied (publickey). Could not read from remote repository

ssh -v git@github.com

 

ssh-agent -s 

  

 ssh-add ~/.ssh/id_rsa

github配置SSH密钥,解决git@github.com: Permission denied (publickey). Could not read from remote repository

 

identity added后面那个地址就是密钥加入的地址

ssh-agent bash
 ~/.ssh/id_rsa

然后用cat显示id_rsa.pub中的密钥,然后复制它

cat ~/.ssh/id_rsa.pub

 进入github的设置

github配置SSH密钥,解决git@github.com: Permission denied (publickey). Could not read from remote repository

 

 添加SSH Keys

github配置SSH密钥,解决git@github.com: Permission denied (publickey). Could not read from remote repository

 

title随便起,把先前复制的密钥粘贴在Key里边即可

 github配置SSH密钥,解决git@github.com: Permission denied (publickey). Could not read from remote repository

 

上一篇:git如何连接codding。(GitHub相似)


下一篇:物联网入门