问题描述
我的机器曾经有一个与某个GitHub帐户account_a相关联的RSA密钥。
我从我的钥匙链中删除了该钥匙,创建了一个新钥匙,添加了然后确保我在GitHub上的任何其他帐户都不再有与其关联的任何SSH密钥。
请注意,我的计算机上的用户拥有没有改变。我刚刚创建了一个新的GitHub帐户,并重新生成了任何密钥,小心地从已失效的帐户中删除旧密钥,以防万一。
我希望我的新提交可以添加到我的全新用我的新帐户回购以反映我现在使用的用户。相反,它们显示为我的旧帐户之一,例如account_a。
我不知道如何解决这个问题,甚至不知道它是从哪里来的。
该关联更可能来自您的配置 user.name
和 user.email
。
如果您更改这些以重新设置新的GitHub帐户,则应将该提交与其关联。 / p>
OP确认:
您也可以直接使用:
git config --global user.email yourNewEmail
My machine used to have an RSA key associated with a certain GitHub account, account_a.
I removed that key from my key chain, created a new key, added it to the chain, and then made sure that any other accounts I had on GitHub no longer had any SSH keys associated with them.
Note that the user on my machine has not changed. I just created a new GitHub account and regenerated any keys, being careful to remove old keys from defunct accounts, just in case.
I expect my new commits to my brand new repo with my new account to reflect the user I am using now. Instead they show up as one of my old, defunct accounts, like account_a.
I have no idea how to fix this, or even where it's coming from.
That association is more likely derived from your config user.name
and user.email
.
If you change those to relfect your new GitHub account, the commits should be associated with it.
The OP confirms:
You can also change it directly with:
git config --global user.email yourNewEmail
这篇关于Git提交与旧的,已停用的用户相关联,而不是我现在拥有的用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!