I changed my github username recently. I created a new repo in my github and updated the remote origin using git remote add origin
command. When I try to run git push origin master
, however, I get remote: Repository not found.
error.
我最近更改了我的github用户名。我在我的github中创建了一个新的repo,并使用git remote add origin命令更新了远程源。当我尝试运行git push origin master时,我得到远程:找不到存储库。错误。
I've looked through past SO questions on this topic and tried 1) successfully generating new SSH keys, 2) running the command with my <username>:<pwd>@github.com
. I still see remote: Repository not found.
error.
我已经查看了过去关于这个主题的SO问题,并尝试了1)成功生成新的SSH密钥,2)使用我的
Any solutions?
1 个解决方案
#1
Part of the github URL for accessing your git repository is the username of the owner. For example:
用于访问git存储库的github URL的一部分是所有者的用户名。例如:
https://github.com/koush/AndroidAsync.git
If the owner koush changes their name, this URL is no longer valid. The new URL needs to use the By removing the old URL with your obsolete username and adding the new URL with your updated username, you again have a valid URL.
如果所有者koush更改了其名称,则此URL不再有效。新URL需要使用通过删除旧URL和过时的用户名并使用更新的用户名添加新URL,您再次拥有有效的URL。
In gitlab, there are warnings about what happens when you change the username:
在gitlab中,有关于更改用户名时会发生什么的警告:
Changing your username will change path to all personal projects!
更改用户名将改变所有个人项目的路径!
#1
Part of the github URL for accessing your git repository is the username of the owner. For example:
用于访问git存储库的github URL的一部分是所有者的用户名。例如:
https://github.com/koush/AndroidAsync.git
If the owner koush changes their name, this URL is no longer valid. The new URL needs to use the By removing the old URL with your obsolete username and adding the new URL with your updated username, you again have a valid URL.
如果所有者koush更改了其名称,则此URL不再有效。新URL需要使用通过删除旧URL和过时的用户名并使用更新的用户名添加新URL,您再次拥有有效的URL。
In gitlab, there are warnings about what happens when you change the username:
在gitlab中,有关于更改用户名时会发生什么的警告:
Changing your username will change path to all personal projects!
更改用户名将改变所有个人项目的路径!