git github cannot push to origin

前端 未结 3 1073

I may be missing something, but I\'m sure that I\'ve checked everything, I forked a repo and cloned it on my system, made some changes after commiting did git push or

3条回答
  •  佛祖请我去吃肉
    2020-12-31 14:08

    The reason why this does not work is, that the git:// protocol, which you chose for cloning, is only configured for read access at Github (since it only would support anonymous write access without access restrictions).
    Github supports both ssh (git@github.com...) and https for write access to repositories.

    Your second command fails, because when you clone, git already creates a remote named origin. So if you want to add another remote repository, you have to give another name.

提交回复
热议问题