centos里git配置ssh账户--阿里云code

先在本地生成ssh key,生成公钥和私钥,后续在github等代码托管配置中需要用到

ssh-keygen -t rsa -C "your_email@youremail.com"

确认路径按1次回车,提示:Enter passphrase(输入密码),不用输密码再按2次回车即可。生成的密钥存放路径 /root/.ssh/id_rsa

id_rsa:私钥 ,id_rsa.pub:公钥

cat /root/.ssh/id_rsa.pub

登录https://code.aliyun.com/

在菜单中点击设置-〉ssh公钥->id_rsa.pub内容做为公钥进行添加

Notifications

Video is playing.