生成并部署SSH key
1.如何生成ssh公鑰
你可以按如下命令來生成 sshkey:
ssh-keygen -t rsa -C"xxxxx@xxxxx.com"
# Generating public/private rsa key pair...# 三次回車即可生成 ssh key
查看你的 public key圃郊,并把他添加到gitlab/GitHub/碼云(gitlab.com/github.com/Gitee.com) SSH key添加地址:https://gitee.com/profile/sshkeys)
cat ~/.ssh/id_rsa.pub
# ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6eNtGpNGwstc....
添加后,在終端(Terminal)中輸入
ssh -Tgit@gitee.com
若返回
WelcometoGitee.com, yourname!
則證明添加成功女蜈。