缺少公钥
1 生成公钥
ssh-keygen -t rsa -C "git注册邮箱"
一路回车即可
/home/usrname/.ssh目录下会生成以下3个文件:
id_rsa id_rsa.pub known_hosts
2 添加公钥
登录github,在Settings界面点击左边的 SSH and GPG keys,然后复制 id_rsa.pub 文件的内容到SSH keys,点击Add SSH key即可
3 验证
ssh -T git@github.com
缺少公钥
ssh-keygen -t rsa -C "git注册邮箱"
一路回车即可
/home/usrname/.ssh目录下会生成以下3个文件:
id_rsa id_rsa.pub known_hosts
登录github,在Settings界面点击左边的 SSH and GPG keys,然后复制 id_rsa.pub 文件的内容到SSH keys,点击Add SSH key即可
ssh -T git@github.com