问题描述
试图从我的电脑上处理我的实际工作回购以及个人对git hub的回购。
工作帐号首先被设置,并且一切都完美无瑕。
然而,我的个人帐户似乎无法推送到我个人的回购站点,该回购站点设置在另一个帐户/电子邮件下。
我尝试将我的工作密钥复制到我的个人帐户,但是会引发错误,因为一个密钥只能附加到一个帐户。
如何从它们各自的github凭证中推送/取出两个帐户?
-
这个链接很容易遵循(谢谢Eric):
生成SSH密钥(Win / msysgit) This link is easy to follow (Thanks Eric):http://code.tutsplus.com/tutorials/quick-tip-how-to-work-with-github-and-multiple-accounts--net-22574
Generating SSH keys (Win/msysgit)https://help.github.com/articles/generating-an-ssh-key/
希望这有助于。
$ b 编辑:
更新了链接
Trying to work on my both my actual "work" repos, and my personal repos on git hub, from my computer.
The work account was set up first, and everything works flawlessly.
My personal account, however cannot seem to push to my personal repo, which is set up under a different account/email.
I've tried copying my work key up to my personal account, but that throws an error, because of course a key can be only attached to one account.
How can I push/pull to and from both accounts, from their respective github credentials?
All you need to do is configure your SSH setup with multiple SSH keypairs.
Also, if you're working with multiple repositories using different personas, you need to make sure that your individual repositories have the user settings overridden accordingly:
Setting user name, email and GitHub token – Overriding settings for individual reposhttps://help.github.com/articles/setting-your-commit-email-address-in-git/
Hope this helps.
EDIT:Updated links
这篇关于在同一台计算机上有多个github帐户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!