使用GitHub
1. SSH配置
请参考使用SSH博客
配置config文件
vim ~/.ssh/config
在里面添加
Host github.com
HostName github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/xxx
# 这里xxx换成你命名的私钥名称
2. 添加SSH key到GitHub
拷贝xxx.pub文件的内容
vim ~/.ssh/xxx.pub
登录GitHub账号,从右上角的设置进入,然后点击菜单栏的 SSH key 进入页面添加 SSH key
3. 设置Git信息
git config --global user.name '你的名字'
git config --global user.email '你的邮箱'
git config --list
可以查看信息
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 雯欂の修仙笔记!