Windows通过SSH直连代码仓库gitee,aliyun,github
1. 假设用户目录为c:/users/a
2. 将公钥、私钥保存置c:/users/a/.ssh
3. 将公钥里的内容保存至相应代码仓库的sshkeys
4. 在c:/users/a/.ssh添加文件config, 内容如下:
Host code.aliyun.com HostName code.aliyun.com IdentityFile C:\Users\a\.ssh\code_aliyun PreferredAuthentications publickey User jmbkeyes Host gitee.com HostName gitee.com IdentityFile C:\Users\a\.ssh\code_aliyun PreferredAuthentications publickey User jmbkeyes Host github.com HostName github.com IdentityFile C:\Users\a\.ssh\code_aliyun PreferredAuthentications publickey User jmbkeyes
5. 在命令行下执行相应的命令 ssh -T git@github.com、ssh -T git@code.aliyun.com、ssh -T git@github.com