配置用户名
git config --global user.name "whoooooooh"
配置邮箱
git config --global user.email "whoooooooh@foxmail.com"
生成密钥
ssh-keygen -t rsa -C "whoooooooh@foxmail.com"
密钥对的位置默认在计算机当前用户目录的.ssh里
cat ~/.ssh/id_rsa.pub
登陆你的github帐户。点击你的头像,然后 Settings -> 左栏点击 SSH and GPG keys -> 点击 New SSH key,
复制上面的公钥内容,粘贴进“Key”文本域内,点击 Add key。
测试命令
ssh -T git@github.com