1. 建立公钥和私钥
ps:公钥放在github上面的,私钥放在自己本地电脑 ;
先生成密钥:打开 gitbash 输入命令:
ssh-keygen -t rsa -b 4096 -C "zhulongxu2022@163.com"
结果:
Generating public/private rsa key pair. Enter file in which to save the key (/c/Users/zhulo/.ssh/id_rsa): Created directory '/c/Users/zhulo/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /c/Users/zhulo/.ssh/id_rsa Your public key has been saved in /c/Users/zhulo/.ssh/id_rsa.pub The key fingerprint is: SHA256:zrhuxX/87PmZODzZq1lGIn7TTq1Fqzh0v4IlcAscftI zhulongxu2022@163.com The key's randomart image is: +---[RSA 4096]----+ | | | . | | o o | | * E | | .S *... ..| | +o .+.o+.o| | ..o..o*o+*o| | .. .o=BX*o| | oo o.B@B+| +----[SHA256]-----+
有如上代码表示成功;
标签:zhulo,github,Users,..,rsa,ssh,key,密钥 From: https://www.cnblogs.com/zhulongxu/p/17107839.html