git 配置多个SSH-Key
1,生成一个公司用的SSH-Key
$ ssh-keygen -t rsa -C "[email protected]” -f ~/.ssh/id-rsa2,生成一个github用的SSH-Key
$ ssh-keygen -t rsa -C "[email protected]” -f ~/.ssh/github-rsa3,添加私钥
$ ssh-add ~/.ssh/id_rsa $ ssh-add ~/.ssh/github_rsa$ ssh-agent bash# 可以通过 ssh-add -l 来确私钥列表
$ ssh-add -l
# 可以通过 ssh-add -D 来清空私钥列表
$ ssh-add -D4,修改配置文件
5,目录结构

6,测试
最后更新于