Git-03-配置GitHub仓库

2018-12-02  本文已影响4人  GJCode

配置GitHub

1、配置同一个GitHub网站下多个仓库
Host github.com-GJ9117
    User git
    HostName github.com
    IdentityFile ~/.ssh/id_rsa_gj9117@gmail.com

Host后面配置的标识作用于在git remote add 时填写的git地址的前半部分所要更换的内容

git remote add GJ9117 git@GJ9117:GJBlog/LearnGit.git
2、配置不同网站仓库
Host github.com-GJ9117(标识)
    User git
    HostName github.com
    IdentityFile ~/.ssh/id_rsa_gj9117@gmail.com(对应sshKey的公钥)

参考资料

上一篇 下一篇

猜你喜欢

热点阅读