【发布时间】:2018-03-22 13:39:06
【问题描述】:
我可以为不同的 GitHub 帐户管理多个 SSH 密钥,以便我可以访问多个帐户和项目,每个帐户和项目都具有不同的凭据。但是,我是否可以在同一个 RStudio 中使用两个不同的 github 帐户(推和拉)处理两个不同的项目?我在网上搜索但找不到答案。我的文件夹中有相关的 SSH 密钥。但是,我无法在 RStudio 的全局选项中更改 SSH RSA 密钥,因为它总是放置文件~/.ssh/id_rsa。但我还有另一个 Github 帐户 ~/.ssh/id_rsa_SECOND 的密钥。我将不胜感激任何帮助!谢谢!
编辑: 我的配置文件有,
Host me.github.com
HostName github.com
PreferredAuthentications publickey
IdentityFile Clone ~/.ssh/id_rsa
Host github.com
HostName github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa_SECOND
这告诉我使用 me.github.com 而不是 github.com 作为第一个 Github 帐户中存储库的主机(身份为 ~/.ssh/id_rsa)并使用 github.com 作为第二个 Github 帐户中的存储库(具有身份 ~/.ssh/id_rsa_SECOND)。但是,当我在个人帐户中克隆存储库时,使用 git@ **me**.github.com:username/hugo-academic.git 不起作用。
【问题讨论】: