在Github上更改用户名

时间:2017-05-01 08:58:02

标签: git github github-for-windows

以前,我更改了 Github 帐户用户名。我创建了一个新的Repo并尝试使用git推送它。但它返回错误:

remote: Permission to <current-username>/<repo>.git denied to <previous-username>. 
fatal: unable to access 'https://github.com/<current-username>/<repo>.git/':
The requested URL returned error: 403

任何人都有解决这个问题的方法吗?感谢

1 个答案:

答案 0 :(得分:1)

您应该将您的SSH密钥更新为git local上的用户名甚至更新。

  1. 更新用户名和密码
  2. https://help.github.com/articles/setting-your-username-in-git/

    1. 生成SSH密钥并将其添加到您的github帐户。
    2. https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/

相关问题