美文网首页
git ssh配置

git ssh配置

作者: xuanxiao | 来源:发表于2020-09-26 14:20 被阅读0次

官方地址
简要概括

第一步

#改为自己的邮箱
ssh-keygen -o -t rsa -b 4096 -C "email@example.com"

第二步

打开github,找到自己的头像,点击Settings,找到SSH and GPG keys,点击New SSH key,填写标题和key
获取key

cd ~/.ssh
vim id_rsa.pub

将内容全部复制

第三步

如果不是root用户

sudo cp id_rsa /root/.ssh

第四步

#如果没有端口可以将 -p 80 去掉
ssh -T -p 80 git@github.com

完成

相关文章

网友评论

      本文标题:git ssh配置

      本文链接:https://www.haomeiwen.com/subject/wfvcuktx.html