-
生成 SSH 密钥(如果还没有)
在新服务器上,打开终端并运行以下命令来生成 SSH 密钥:
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
-
查看秘钥
cat ~/.ssh/id_rsa.pub
-
将公钥添加到 GitHub
Settings/keys
->New SSH key
生成 SSH 密钥(如果还没有)
在新服务器上,打开终端并运行以下命令来生成 SSH 密钥:
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
查看秘钥
cat ~/.ssh/id_rsa.pub
将公钥添加到 GitHub
Settings/keys
-> New SSH key