I was working on a branch called main that was based on a remote github repository that does not belong to me. Now, that I have added modifications to this local branch, I want to push it into a remote branch on github that belongs to me.
git status:
On branch main
Your branch is ahead of 'origin/main' by 2 commits.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
(venv)
git push --set-upstream origin <my_repository_name>
error: src refspec my_repository_name does not match any
error: failed to push some refs to 'https://github.com/username/my_repository_name.git'
NOTE:
After applying Marcelo's suggestion, I attempted to push to the forked version of the repository and I still received the error message:
remote: Permission to username/my_repository_name.git denied to username.
fatal: unable to access 'https://github.com/username/my_repository_name.git/': The requested URL returned error: 403
UPDATE1:
git remote -v
myrepo https://github.com/username/my_repository_name.git (fetch)
myrepo https://github.com/username/my_repository_name.git (push)
origin https://github.com/username/my_repository_name.git (fetch)
origin https://github.com/username/my_repository_name.git (push)
upstream https://github.com/someone_else/my_repository_name.git (fetch)
upstream https://github.com/someone_else/my_repository_name.git (push)