我最近将一个存储库克隆到本地驱动器,但现在我尝试将所有更改推送到一个完整的新存储库。然而,git 不断告诉我权限被拒绝,这是因为它正在尝试推送到最初克隆的存储库。
DETAILS:
我最初克隆自https://github.com/taylonr/intro-to-protractor https://github.com/taylonr/intro-to-protractor(即基于 Pluralsight 课程https://app.pluralsight.com/library/courses/protractor-introduction/table-of-contents https://app.pluralsight.com/library/courses/protractor-introduction/table-of-contents ) .
现在我已经完成了课程,我想将我的最终代码推送到我自己的 git 存储库(我刚刚在 github 上创建):
https://github.com/robertmazzo/intro-to-protractor https://github.com/robertmazzo/intro-to-protractor
当我使用以下 git 命令时:
git 远程添加原点https://github.com/robertmazzo/intro-to-protractor.git https://github.com/robertmazzo/intro-to-protractor.git
它告诉我remote origin already exists
,我认为这很好,因为我已经在 github.com 上创建了它。
然而,当我推动更改时,我遇到了例外。
git推送原点大师
remote: Permission to taylonr/intro-to-protractor.git denied to robertmazzo.
fatal: unable to access 'https://github.com/taylonr/intro-to-protractor.git/':
The requested URL returned error: 403
因此,我正在研究如何切换到新存储库,但这正是我的问题所在。我无法弄清楚这部分。
要将当前来源更改为新来源,请使用:
git remote set-url origin <url>
Source:
https://help.github.com/articles/changing-a-remote-s-url/ https://help.github.com/articles/changing-a-remote-s-url/
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)