在 git 中重新验证访问权限
Re-authenticating access in git
我设置git的时候用了一个username/email组合。
然后我在 GitHub 上更改了我的用户名和电子邮件组合。
现在,当我尝试推送到我的存储库时,我收到以下错误消息:
Permission denied (publickey)
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我知道存储库存在。所以我有一种感觉 git 正在尝试使用我的旧用户名和电子邮件与 gitHub 进行通信,现在 obvi 无法识别为我。
如何删除存储的 github 帐户信息并在 git 中重新验证?
重要的部分是用户名:如果您更改了GitHub帐户,那么您需要确保您的$HOME/.ssh/id_rsa.pub
(或%USERPROFILE%\.ssh\id_rsa.pub
) 已在该新帐户中注册。
电子邮件部分不重要(gravatar displayed with your old commits除外)
我设置git的时候用了一个username/email组合。
然后我在 GitHub 上更改了我的用户名和电子邮件组合。
现在,当我尝试推送到我的存储库时,我收到以下错误消息:
Permission denied (publickey)
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我知道存储库存在。所以我有一种感觉 git 正在尝试使用我的旧用户名和电子邮件与 gitHub 进行通信,现在 obvi 无法识别为我。
如何删除存储的 github 帐户信息并在 git 中重新验证?
重要的部分是用户名:如果您更改了GitHub帐户,那么您需要确保您的$HOME/.ssh/id_rsa.pub
(或%USERPROFILE%\.ssh\id_rsa.pub
) 已在该新帐户中注册。
电子邮件部分不重要(gravatar displayed with your old commits除外)