我可能遗漏了一些东西,但我确信我已经检查了所有内容,
我分叉了一个存储库并将其克隆到我的系统上,
做了一些改变
提交后
做过git push origin master
it says
fatal: remote error:
You can't push to git://github.com/my_username/my_repo.git
Use [email protected]:my_username/my_repo.git
我错过了什么吗?
然后我尝试了
git remote add origin https://github.com/my_username/my_repo.git
它回来了
致命:远程源已存在。
我不明白为什么会发生这种情况,请帮忙
网址与
git://github.com/my_username/my_repo.git
git:// 仅提供只读访问权限,如侧面所述。
Whereas,
[email protected]:my_username/my_repo.git
提供站点中提到的读写访问权限
Though, https://github.com/my_username/my_repo.git
也具有读写访问权限,但它在您的情况下不起作用,因为您尝试创建一个具有相同名称的新遥控器而不是重置它。提到的正确语法是
git remote set-url origin [email protected]:my_username/my_repo.git
And
git remote set-url origin https://github.com/my_username/my_repo.git
也会起作用。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)