添加多个SSH

生成秘钥

打开git bash

$cd~/.ssh  # 切换到C:\Users\Administrator\.ssh

ssh-keygen -t rsa -C"mywork@email.com" # 新建工作的SSH key 

# 设置名称为id_rsa_work

Enter fileinwhichto save the key (/c/Users/Administrator/.ssh/id_rsa): id_rsa_work

在ssh文件夹下创建config文件

# 建一个github别名,新建的帐号使用这个别名做克隆和更新

Host git.coding.net

PreferredAuthentications publickey

IdentityFile ~/.ssh/id_rsa_work

引用文章

http://www.cnblogs.com/zichi/p/4704824.html

https://coding.net/help/doc/git/ssh-key.html

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容