GitHub 配置SSH密钥

· 1min · Paxon Qiao

GitHub 配置SSH密钥

查看已存在的 SSH 密钥

cat ~/.ssh/id_rsa.pub

生成SSH密钥

ssh-keygen -t rsa -C "GitHub/gitee邮箱地址"

密钥默认生成路径:/home/user/.ssh/id_rsa,公钥与之对应为:/home/user/.ssh/id_rsa.pub

查看公钥并把公钥复制到GitHub中

cat /Users/qiaopengjun/.ssh/id_rsa.pub

GitHub中settings页面