I am having difficulties pushing changes I’ve made to a forked a repo I made.
I wanted to make some changes to the README.md file for my local .NET user group GitHub repo. I forked the repo into a copy of the original under my GitHub account. Since I’m new at this I looked at Kent Dodds tutorial) on how to configure things so my local repo would fetch from the original repo, but I had thought push to my forked repo. Or at least that’s what I thought.
But I’ve made some mistake. After I made edits and committed them locally, I tried to push my changes to my forked repo. However, this is the error I got:
D:\GitHub\nmug.github.io [master ↑1]> git push
remote: Permission to nmug/nmug.github.io.git denied to rfalanga.
fatal: unable to access ‘https://github.com/nmug/nmug.github.io.git/’: The requested URL returned error: 403
So next I entered checked my remotes and here’s what I got:
D:\GitHub\nmug.github.io [master ↑1]> git remote -v
origin https://github.com/rfalanga/nmug.github.io.git (fetch)
origin https://github.com/rfalanga/nmug.github.io.git (push)
upstream https://github.com/nmug/nmug.github.io.git (fetch)
upstream https://github.com/nmug/nmug.github.io.git (push)
I want to fetch/pull from upstream, but push to my origin. What have I done wrong and how do I fix it, please?
(I’m using posh-git)