Mac生成ssh,并添加公钥到Github

tech2023-06-15  108

直接上代码:

cd ~ ssh-keygen

一路回车,然后就在/User/用户名/.ssh目录下生成了id_rsa.pub(公钥)与id_rsa(私钥),需要复制公钥:

vi .ssh/id_rsa.pub

然后复制公钥,打开github网址:https://github.com/settings/keys,点击 New SSH Key 即可

最新回复(0)