【github】ubuntu18.04 配置github

配置账户

配置用户名和邮箱

#  用户名
git config --global user.name "doreamon95"
# 邮箱
git config --global user.email doreamon95@163.com

添加SSH keys

生成SSH key

默认保存位置是 /root/.ssh

ssh-keygen -t rsa -C "doreamon95@163.com"

结果如下所示

复制

cat ~/.ssh/id_rsa.pub

内容如下

登陆github添加

操作如下

测试是否配置成功

ssh -T git@github.com
输入yes,然后提示成功

原文地址:https://www.cnblogs.com/ycx95/p/12122306.html