本地 Git 配置

新机器随便玩 先生成 sshKey

| 如果你以前生成过 直接 cat ~/.ssh/id_rsa.pub 就成

1
2
3
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"


确认key后 再设置一下用户名 邮箱完事

1
2
git config --global user.name "Your Name"

1
2
git config --global user.email "your_email@example.com"

| 最后把你的sshkey 添加到git 账户公钥里 就可以了