I forked a project, cloned it, made changes and tried to push to my fork, in order to do a PR on the original project.
I was having trouble pushing.
I kept seeing this message:
remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
Then after trying all combinations from this question:
Message “Support for password authentication was removed.”
This command is the only one that changed things:
git remote set-url origin https://<token>@github.com/<username>/<repo>
After this I kept receiving this message:
remote: Permission to me/project.git denied to me.
fatal: unable to access 'https://github.com/me/project/': The requested URL returned error: 403
Then I tried all the answers from this question:
fatal: The current branch master has no upstream branch
Then after a while I simply did:
git push
To which I received:
fatal: The current branch my-branch has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin my-branch
I did so, but I returned to this error:
remote: Permission to me/project.git denied to me.
fatal: unable to access 'https://github.com/me/project/': The requested URL returned error: 403
I redid every answer from the last StackOverflow link I sent, but the same error remained.
3