# 移除远程服务器上已经提交的文件
# 移除 .idea文件夹
git rm -r --cached .idea
1
2
2
# 使用多个独立密钥进行ssh
- 生成独立的密钥
ssh-keygen -t rsa -C "zhanghjqqqq@163.com" -f id_github
1
- 配置配置文件
# 路径:~/.ssh
# 文件名称 config
Host github.com
HostName github.com
IdentityFile C:\Users\TWINKLE\.ssh\id_github
PreferredAuthentications publickey
1
2
3
4
5
6
7
2
3
4
5
6
7
- 测试
ssh -T git@github.com
# 显示以下信息则成功:
# Hi kevinkelin! You've successfully authenticated, but GitHub does not provide shell access.
1
2
3
2
3
添加id_github.pub内容到github
局部配置git配置信息
git config user.email zhanghjqqqq@163.com
git config user.name TWINKLE
1
2
2