初次运行 Git 前的配置

配置用户名

git config --global user.name 'liweibin'
git config --global user.email liweibin@okay.cn

生成密钥

#查看密钥
cat ~/.ssh/id_rsa.pub

#不存在则生成密钥
ssh-keygen -t rsa -C "你的邮箱"

以上完成以后就可以使用git了