在~/.ssh目录下新建文件config,格式如下
Host "authmanage"
HostName "code.youkuaiyun.com"
User "git"
IdentityFile "C:/Users/WangJun/.ssh/id_rsaAuthManage"
Host "demo"
HostName "code.youkuaiyun.com"
User "git"
IdentityFile
本文介绍了如何为不同的git项目配置多个SSH密钥,通过在~/.ssh/config文件中设置Host、HostName、User和IdentityFile参数,实现按项目切换SSH密钥。例如,配置'authmanage'和'demo'两个项目的SSH密钥,并通过指定Host名称进行clone操作。此外,还提及了生成SSH私钥公钥的命令。
Host "authmanage"
HostName "code.youkuaiyun.com"
User "git"
IdentityFile "C:/Users/WangJun/.ssh/id_rsaAuthManage"
Host "demo"
HostName "code.youkuaiyun.com"
User "git"
IdentityFile

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