在 Visual Studio 代码中
我为此花费了更多时间,我正在尝试将来自第一个帐户 github 的已删除项目推送到 新的另一个帐户中的现有存储库中,但我收到如下错误:
$ git push -u origin main
remote: Permission to username/project_name.git denied to first_account_username.
fatal: unable to access 'https://github.com/user_name/project_name.git/': The requested URL returned error: 403
Run Code Online (Sandbox Code Playgroud)
我尝试使用这些命令行将现有存储库推送到新帐户中,请让我知道我错过了什么?
git remote add origin https://github.com/user_name/project_name.git
git branch -M main
git push -u origin main
Run Code Online (Sandbox Code Playgroud)