Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/xpath/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Github上更改用户名_Git_Github_Github For Windows - Fatal编程技术网

在Github上更改用户名

在Github上更改用户名,git,github,github-for-windows,Git,Github,Github For Windows,以前,我更改了我的Github帐户用户名。我创建了一个新的回购协议,并尝试使用git来推动它。但它返回错误: remote: Permission to <current-username>/<repo>.git denied to <previous-username>. fatal: unable to access 'https://github.com/<current-username>/<repo>.git/': The

以前,我更改了我的Github帐户用户名。我创建了一个新的回购协议,并尝试使用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
remote:to/.git的权限被拒绝。
致命:无法访问'https://github.com//.git/':
请求的URL返回错误:403

有人能解决这个问题吗?谢谢

您应该将SSH密钥更新到git local上,甚至更新用户名

  • 更新用户名和密码
  • 生成SSH密钥并将其添加到您的github帐户

    如果仔细查看错误消息,您会发现您的旧凭据仍在使用中。在执行任何操作之前,您可能需要在本地缓存新凭据。我已经通过更改全局和单个repo用户名更改了旧凭据。我还更改了SSH密钥,但仍然不起作用。您对此有解决方案吗?我已经做了这些事情,但错误消息与我之前提到的相同。关于这个问题,你有其他解决方案吗?@muhammadfuzanrazandi,在你的存储库上试试这个:git远程设置url源(在你的github上复制链接并粘贴)谢谢兄弟,已经解决了。当我使用SSH时,它就工作了。这太棒了@muhammaddufuzanrazandi