美文网首页
一台电脑多个git账号,clone方法

一台电脑多个git账号,clone方法

作者: 梦随兴飞 | 来源:发表于2020-02-22 01:42 被阅读0次

1.查看用户~/.ssh下是否存在 config文件,如不存在使用命令 touch config创建,然后配置config

# default

Host github.com

HostName github.com

User git

IdentityFile  ~/.ssh/id_rsa

# two                                                                         

Host binfy

HostName github.com

User git

IdentityFile  ~/.ssh/githubrsakey

2.clone项目到本地

原先操作:git clone git@github.com:yourAccount/xxx.git;

现改为:git clone git@binfy:binfy/xxx.git

相关文章

网友评论

      本文标题:一台电脑多个git账号,clone方法

      本文链接:https://www.haomeiwen.com/subject/lmykqhtx.html