- git config --global user.name “yourname”
- git config --global user.email“xxxxxxxxx.com"
- 除.ssh文件夹(直接搜索该文件夹)下的known_hosts(手动删除即可,不需要git)
- $ ssh-keygen -t rsa -C "your@email.com"(请填你设置的邮箱地址)
- 出现:
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/your_user_directory/.ssh/id_rsa):
- 连续回车
- 然后系统会自动在.ssh文件夹下生成两个文件,id_rsa和id_rsa.pub,打开id_rsa.pub,全部的内容复制
- 打开https://github.com/,添加ssh
- ssh -T git@github.com
- yes
- 关闭窗口,重新操作
234



被折叠的 条评论
为什么被折叠?



